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 |
QuietRiot
Yak Posting Veteran
67 Posts |
Posted - 2008-01-29 : 20:46:27
|
Say I have a table called Table_Name and it has 133 columns. How can I view a list of all the column headers (items) and what they are: int, Char(30), datetime, numeric etc etc.Thanks,QR |
|
chorofonfilo
Starting Member
40 Posts |
Posted - 2008-01-29 : 20:59:12
|
You can use the enterprise manager to do so.-Go to the database in which your table is located.-Click in one of the tables of it.-Right click on it, and choose properties, it will show the fields names, and their types.Perseverance worths it...:) |
 |
|
hey001us
Posting Yak Master
185 Posts |
Posted - 2008-01-29 : 22:12:16
|
this will help you select sc.* from syscolumns sc join sysobjects so on sc.id = so.id where so.name = 'Table_Name' order by sc.namehey |
 |
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2008-01-29 : 23:11:04
|
[code]select *from information_schema.columns awhere a.TABLE_SCHEMA = 'dbo' and a.TABLE_NAME = 'MyTableName'[/code]CODO ERGO SUM |
 |
|
|
|
|