Varchar(max) vs Text in MS SQL


Are there any plans to start using Varchar(max) for sql data types rather than text. According to the Outsystems documentation it looks like if a string goes over 2k characters it gets put in a Text datatype. 

In MS SQL you can have a Varchar up to 8k characters and nVarchar up to 4k characters. Varchar(max) also attempts to fit as much or the the characters into the row up to the 8k limit before creating a BLOB.

Also, the Text data type has been depreciated since Sql 2005.

Edit: Just thinking about it, if you're restricting it to 2k to cater for Oracle's Varchar datatype it seems a bit wrong to restrict all other databases to use the lowest common denominator. Oracles varchar2 can have up to 4k characters and nVarchar2 can have 4k bytes  or up to 4k characters. As far as I remember MySQL's varchar limit is restricted by the 65k byte row limit and the character limit will depend on the character set.
Hi Nick,

I'm pretty sure that it is a documentation issue, I'll confirm it and ask for an update.
In MSSql it creates a nvarchar(max) since a couple major versions back. Old tables are not automatically upgraded to the new type.

João Rosado
Great thanks João.
Hi again,

Just checked it:


João Rosado
Ah excellent thank you!