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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get SQL column descriptions?

Status
Not open for further replies.

sobesoft

Programmer
Mar 10, 2001
10
US
I want to get column descriptions from SQL to put on my front end labels instead of hard coding them. I know I could probably do this through extended properties. Does anyone have any other ideas for creating and accessing this meta-data from the front end?
 
Try this query
SELECT * FROM INFORMATION_SCHEMA.COLUMNS

In sql 7.0 and above you access the metadata using
INFORMATION_SCHEMA, all this are views based on the system table.
some other schema
INFORMATION_SCHEMA.TABLES
...
check BOL for more.

dbtech
 
Hi sobesoft,
Use the system stored procedure
sp_columns tablename

This will give you a detailed description of columns.

Mukund.
 
Hi

If all the things doesn't work just try

Fn_ListExtendedProperty

the system function.
For more details go thr Help.
u can use this function only with SQL server 2000.

Bye
Dhir
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top