How To View Column Names For A Table In T-SQL

SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = '<TABLE NAME>'
ORDER BY ORDINAL_POSITION

 
 

Bookmark and Share

About admin

Freelance Web Developer C# .NET, PHP5 Zend Framework, Flex/Actionscript
This entry was posted in Programming and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>