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
 General SQL Server Forums
 New to SQL Server Programming
 how 2 get the table structure using T-SQL

Author  Topic 

rtutus
Aged Yak Warrior

522 Posts

Posted - 2006-09-11 : 15:09:16
How can I get my table structure (columns, their types, whether it s an Identity column) using T-SQL
pls
Thanks you

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-09-11 : 15:11:20
sp_help tablename


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-09-12 : 01:51:45
Or simply select tablename in QA and press Alt+F1 (Shortcut way!!)

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

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-09-13 : 09:27:44
or make use of Information_schema.columns View

Madhivanan

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

rtutus
Aged Yak Warrior

522 Posts

Posted - 2006-09-14 : 13:49:40
Hi Harsh Athalye, what do I select before I type Alt F1, because that only gives me info about the DB and not about one specific table
Thanks guys for your help
Go to Top of Page

KenW
Constraint Violating Yak Guru

391 Posts

Posted - 2006-09-14 : 15:25:37
Like harsh said:

quote:

simply select tablename in QA and press Alt+F1 (Shortcut way!!)


Go to Top of Page
   

- Advertisement -