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 |
|
qman
Constraint Violating Yak Guru
442 Posts |
Posted - 2010-01-07 : 09:55:34
|
| I am trying to loop through all tables in my db and identify those tables which have a State_ column.Can someone help me out with the SQL needed to perform this?Thanks |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-01-07 : 10:00:00
|
no need of loop. just useSELECT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME LIKE 'State_%' |
 |
|
|
qman
Constraint Violating Yak Guru
442 Posts |
Posted - 2010-01-07 : 10:01:53
|
| Visakh16:Once again, thanks for the quick response!Qman |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-01-07 : 10:02:13
|
Welcome |
 |
|
|
|
|
|