I have a SQL Server database and I want to know what columns and types it has. I\'d prefer to do this through a query rather than using a GUI like Enterprise Manager. Is the
use
SELECT COL_LENGTH('tablename', 'colname')
None of other solution worked for me.