Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I retrieve column names?

Status
Not open for further replies.

Hurricane766

IS-IT--Management
Nov 30, 2004
34
CA
Hi,
I'm wondering if there is a way to retrieve the names of columns from a table using sql?

Thanks
 
You have to know how your SQL dialect deals with the system catalogs.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks,
I found that this will work:
select Cname from syscolumns where Tname = <table_name>;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top