28 July 2011

get the list of columns that r available in a particular table in sqlserver

select column_name from information_schema.columns where table_name='tblEmp'

or

select name from sys.columns where object_id=object_id('tblEmp')

No comments: