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 |
|
landau66
Yak Posting Veteran
61 Posts |
Posted - 2008-07-28 : 07:25:03
|
| hi all!i have a table, with about 25 columns. with the help of select, i want to show all columns except two. select [all columns except name, address] from TestListis there a way to write it that way??thank u very much in advance and greetings from viennalandau |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-07-28 : 07:33:16
|
| Make use of the resultSelect column_name+',' from information_schema.columnswhere table_name='TestList' and column_name not in ('name', 'address')MadhivananFailing to plan is Planning to fail |
 |
|
|
VGuyz
Posting Yak Master
121 Posts |
Posted - 2008-07-28 : 07:43:13
|
| Try this sp,This would give the whole structure of u'r table.From there get the column name and edit the column,Which u want.sp_help 'Table_name'Madhi's query also correct,This is the another way. |
 |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
|
|
|
|
|