Get list of columns in every table

Here is a script to get a list of columns for each table.

SELECT AS TABLE_NAME, AS COLUMN_NAME, c.column_id AS COLUMN_ORDER, c.system_type_id AS DATA_TYPE, c.max_length, c.precision, c.scale, c.is_nullable, c.is_identity 
FROM sys.columns AS c 
INNER JOIN sys.tables AS t ON c.object_id = t.object_id

posted @ Friday, October 4, 2013 1:00 PM


Comments on this entry:

No comments posted yet.

Your comment:

 (will not be displayed)

Please add 8 and 6 and type the answer here:

Live Comment Preview: