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 |
|
jpockets
Starting Member
45 Posts |
Posted - 2007-12-20 : 10:53:22
|
| I just got access to another DB and there is a table in there that has over 300 columns, the boss wants a print out of every column, is there a command in sql that list the columns and their data definations? So i can just export the results to excel? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2007-12-20 : 10:55:46
|
| sp_help TABLENAMElists all columns,indexes,constraints related to table |
 |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2007-12-20 : 10:56:03
|
| sp_help <TableName> |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-12-20 : 10:56:34
|
sp_help tablename E 12°55'05.25"N 56°04'39.16" |
 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2007-12-20 : 10:58:03
|
| USE Sp_tables |
 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2007-12-20 : 10:58:51
|
| For databases and their sizes:sp_databases |
 |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2007-12-20 : 10:59:44
|
quote: Originally posted by sodeep USE Sp_tables
No, that will just give you the schema/owner/tablename info. |
 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2007-12-20 : 11:03:44
|
| Sorry i meansp_columns 'table name' |
 |
|
|
jpockets
Starting Member
45 Posts |
Posted - 2007-12-20 : 11:04:19
|
| Thanks Guys for the help, saved me a lot of time. |
 |
|
|
|
|
|