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 |
|
raysefo
Constraint Violating Yak Guru
260 Posts |
Posted - 2006-05-13 : 07:58:32
|
| Hi,i wanna know how to get the number of columns in a table and get their names? This table is dynamic!thanks |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-05-13 : 08:04:52
|
[code]SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'yourtable'[/code] KH |
 |
|
|
raysefo
Constraint Violating Yak Guru
260 Posts |
Posted - 2006-05-13 : 08:26:41
|
| Thanks so much |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-05-15 : 03:24:13
|
| orsp_columns 'yourtable'MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|