Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 how to view list of columns from a table

Author  Topic 

sqldev80
Yak Posting Veteran

68 Posts

Posted - 2006-09-06 : 16:30:34
how do i see all the columns in a table and without using information schema but sysobjects and syscolums

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-09-06 : 16:37:33
As asked in the other thread, why can't you use the INFORMATION SCHEMA views? They are there for this very purpose.

Tara Kizer
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-09-06 : 20:43:25
or
EXEC sp_columns 'tableName'

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-09-07 : 03:49:25
Why do you want to touch system tables when the information you want is available thru other simpler means?

Use sp_help 'Table' (or better yet, select table name and press Alt + F1) !!

Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-09-07 : 05:31:41
quote:
Originally posted by sqldev80

how do i see all the columns in a table and without using information schema but sysobjects and syscolums



using syscolumns

select * from syscolumns where id = object_id('table_name')



KH

Go to Top of Page
   

- Advertisement -