|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How can I print column name only from table?select column_name
from information_schema.columns where table_name = 'tbl1' tbl1 is the table for which you want to find the list of columns. Hope this is what you want. -- Show quote"coke" wrote: > Is there some Sp out there? coke,
Check the view INFORMATION_SCHEMA.COLUMNS. Example: use northwind go select TABLE_NAME, COLUMN_NAME from INFORMATION_SCHEMA.COLUMNS where TABLE_SCHEMA = 'dbo' and TABLE_NAME = 'Orders' order by ordinal_position go AMB Show quote "coke" wrote: > Is there some Sp out there? |
|||||||||||||||||||||||