This article is specific to MS SQL Server. There can be various need based scenarios where the data returned by the SELECT statement should be limited to certain length for the columns of data type VARCHAR(MAX), NVARCHAR(MAX), VARBINARY(MAX), TEXT, NTEXT, and IMAGE data types. This can be achieved using SUBSTRING or LEFT functions for specific columns in SELECT statement. But if you have a SELECT statement having many columns of the data types specified before and you want to apply data returned length limitation for each column, the better option would be to use TEXTSIZE command. TEXTSIZE command in SQL Server can be used to limit the length of data returned for each column in a SELECT statement. This command is applicable to the columns of following data types:
Remember Me
a@href@title, b, blockquote@cite, em, i, strike, strong, sub, sup, u