Wide Columns with col_length() and datalength()

The commands col_length() and datalength() are “built-in” Transact-SQL functions that return database information. These functions can now return values greater than 225. If you use one of these functions in a query and assign the result to a variable, be sure to make the variable large enough to hold the value.