Pages

Wednesday, May 13, 2009

How to Get SQL Table Columns List

How to get all field names in a table using sql query?



Following query is use for getting all sql table column names from database in Microsoft SQL server.

SELECT c.name
FROM syscolumns c INNER JOIN sysobjects o ON o.id = c.id
WHERE o.name ='TABLENAME'
ORDER BY colid

#How to find all SQL tables with a column name
#How to Get SQL Table Columns List
#How to get all field names in a table using sql query

No comments:

ShareThis

Welcome

Welcome to Rajesh Prajapati, asp.net blog.
Here you can find some useful code and information about asp.net., c#, VB.net, SQL Server, Web Service, Web Designing etc