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 |
sinapra
Starting Member
24 Posts |
Posted - 2006-11-20 : 09:16:36
|
Hello everyoneCan anyone help me by telling me whats the query that returns the column names, datatype, length and other properties without table data.Thanks in AdvanceNaguCheers |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-11-20 : 09:22:54
|
[code]sp_help 'tablename'[/code]where tablename is the name of the table you want information for.or[code]SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'tablename'[/code]Harsh AthalyeIndia."Nothing is Impossible" |
|
|
sinapra
Starting Member
24 Posts |
Posted - 2006-11-20 : 09:32:49
|
Thanks a lot Harsh, that really helps, but that didnot return the length of the datatype except Char type.Cheers |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-11-20 : 09:38:49
|
Have you checked the sp_help procedure?Harsh AthalyeIndia."Nothing is Impossible" |
|
|
sinapra
Starting Member
24 Posts |
Posted - 2006-11-20 : 09:48:38
|
Harsh, I just did and got that as well, thanks again, but one more small one before I give a final touchI tried this in Query Analyzer and extracted the info in CSV, but how to get it done in Enterprise manager, I mean running query is fine, but can it be saved thru enterprise manager.Thanks again in advancePrasadCheers |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-11-20 : 10:08:19
|
I don't think so.Harsh AthalyeIndia."Nothing is Impossible" |
|
|
|
|
|