I keep reading stuff like this:
The text in row option will be removed in a future version of SQL Server. Avoid using this option in new development work, and plan to modify applications that currently use text in row. We recommend that you store large data by using the varchar(max), nvarchar(max), or varbinary(max) data types. To control in-row and out-of-row behavior of these data types, use the large value types out of row option.
So what should we do if we have a varchar(max) field that we want to limit to 16 chars in row?
Thanks!
EDIT. When I say "in row", I mean the VARCHAR/TEXT strings are stored directly in the data row, not as a pointer (with the string data stored elsewhere.) Moving the data out of the row will increase table scan performance if the data moved out of the row is not part of the "where" clause.
EDIT. The text I quoted, says this:
To control in-row and out-of-row behavior of these data types, use the large value types out of row option.
Sure enough:
https://msdn.microsoft.com/en-us/library/ms173530.aspx
But on that page it says this:
The text in row feature will be removed in a future version of SQL Server. To store large value data, we recommend that you use of the varchar(max), nvarchar(max) and varbinary(max) data types.
So the question remains.
EDIT. It appears we will still have the ability to use this table option:
large value types out of row. A value of 1 means varbinary(max), xml and large user-defined type (UDT) columns in the table are stored out of row, with a 16-byte pointer to the root. a value of 0 means varchar(max), nvarchar(max), varbinary(max), xml and large UDT values are stored directly in the data row, up to a limit of 8000 bytes and as long as the value can fit in the record. If the value does not fit in the record, a pointer is stored in-row and the rest is stored out of row in the LOB storage space. 0 is the default.
However, we seem to be losing the option to keep the data in the row when it is small. It will be either all in or all out. Is there any other way to do this?