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.
| Author |
Topic |
|
qman
Constraint Violating Yak Guru
442 Posts |
Posted - 2008-10-17 : 11:04:07
|
| Can someone help me out with the following request?How can I display table information (columns, data type, size, object name, etc....) via SQL Query? Basically, I want to create a query that displays what a certain table is made up of. |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-10-17 : 11:05:42
|
| sp_help 'tablename' |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-17 : 11:06:32
|
| SELECT c.COLUMN_NAME,c.DATA_TYPE,c.TABLE_NAME,..FROM INFORMATION_SCHEMA.COLUMNS cJOIN INFORMATION_SCHEMA.TABLES tON t.TABLE_NAME=c.TABLE_NAMEWHERE t.TABLE_TYPE='BASE TABLE' |
 |
|
|
qman
Constraint Violating Yak Guru
442 Posts |
Posted - 2008-10-17 : 11:08:55
|
| Fantastic, thanks to both of you! |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-17 : 11:09:55
|
quote: Originally posted by qman Fantastic, thanks to both of you!
welcome |
 |
|
|
|
|
|