SELECT SO.NAME AS table_name, SC.NAME AS column_name FROM SYS.OBJECTS SO INNER JOIN SYS.COLUMNS SC ON SO.OBJECT_ID = SC.OBJECT_ID WHERE SO.TYPE = 'U' ORDER BY SO.NAME, SC.NAME
Tuesday, May 24, 2011
SQL - Display All Tables & Columns
Just as a reminder for those databases that you inherit that lack any sort of documentation....
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment