T-SQL equivalent of ‘show columns’

I finally got tired of not being able to see the lisdt of fields sorted alphabetically in Query Analyzer, so I asked Google for help. And I found the answer on the MySQL forums, of all places.

select column_name
from [dbname].information_schema.columns
where table_name = '[tablename]'

Thanks, Roland.

Leave a Reply