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 |
|
inbs
Aged Yak Warrior
860 Posts |
Posted - 2011-05-24 : 07:47:19
|
| i run thisselect * from information_schema.columns where table_name = 'tableA'i want to getcolumnA,ColumnB instead 2 rowscolumnAcolumnB |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2011-05-24 : 09:30:10
|
| Or do like this;declare @cols varchar(max) = ''select @cols = @cols + column_name + ', ' from information_schema...print @cols- LumbagoMy blog-> http://thefirstsql.com/2011/02/07/regular-expressions-advanced-string-matching-and-new-split-function-sql-server-2008-r2/ |
 |
|
|
|
|
|