Scott Johnson

IT App Implementation Tech | Nashville, TN

Tables and Columns

What have we learned today? Well, these little gems have helped me out immensely today. I’m going to keep them handy for future use.

List all of the Tables in a Database

SELECT Name
FROM SYSOBJECTS
WHERE XTYPE=’U’
ORDER BY Name

List all of the Columns in a Table

SELECT Column_Name
FROM INFORMATION_SCHEMA.Columns
WHERE TABLE_NAME = ‘<Name>’

March 18, 2009 - Posted by everydayscott | work | , | No Comments Yet

No comments yet.

Leave a comment