Home Forums SQL Server 2008 T-SQL (SS2K8) i need the max length value of every column in every table in a database RE: i need the max length value of every column in every table in a database

  • ScottPletcher (4/2/2013)


    It's a huge waste to do a separate SELECT from the table for each column.

    You can do a MAX(LEN(column_name)) for all columns in one SELECT statement, and hopefully thus do only one scan (or at least fewer scans) of the table.

    Would you mind showing me what you mean?