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 |
|
raghuram.gupta
Starting Member
3 Posts |
Posted - 2007-12-16 : 09:57:30
|
| I want a query that returns only the column names |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-12-16 : 10:00:59
|
| select <columns> from yourtable where 1=0orset fmtonly onselect <columns> from yourtableset fmtonly off_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenpSSMS Add-in that does a few things: www.ssmstoolspack.com <- new version out |
 |
|
|
raghuram.gupta
Starting Member
3 Posts |
Posted - 2007-12-16 : 10:02:18
|
| what's this 1=0 |
 |
|
|
raghuram.gupta
Starting Member
3 Posts |
Posted - 2007-12-16 : 10:06:08
|
| Actually i want a query that return only columns names as column values |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-12-16 : 10:07:14
|
| select column_namefrom information_schema.columnswhere table_name = 'YourTable'_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenpSSMS Add-in that does a few things: www.ssmstoolspack.com <- new version out |
 |
|
|
|
|
|