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 |
|
siva.meti
Starting Member
32 Posts |
Posted - 2007-10-24 : 03:09:15
|
| HiHow can i drop tables start's with 'bcd'can u plz help meThx& RegardsMeti BEST OF THE BEST |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-10-24 : 03:19:55
|
SELECT 'DROP TABLE ' + table_name FROM information_schema.tableswhere table_name like 'bcd%'then copy and paste the result to a query window and run the statements. E 12°55'05.25"N 56°04'39.16" |
 |
|
|
siva.meti
Starting Member
32 Posts |
Posted - 2007-10-24 : 05:10:06
|
| Yes I had Tried it but it will not droped can u any body give some another solutions plzMeti BEST OF THE BEST |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-10-24 : 05:31:23
|
"but it will not droped"What error are you getting?You might want to trySELECT 'PRINT ''' + TABLE_NAME + '''' + CHAR(13) + CHAR(10) + 'GO' + CHAR(13) + CHAR(10) + 'DROP TABLE ' + TABLE_NAME + CHAR(13) + CHAR(10) + 'GO'FROM INFORMATION_SCHEMA.TABLESWHERE TABLE_NAME LIKE 'bcd%' which will drop each table that it canKristen |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-10-24 : 06:03:03
|
quote: Originally posted by siva.meti Yes I had Tried it but it will not droped can u any body give some another solutions plzMeti BEST OF THE BEST
I hope you are testing this on TEST server MadhivananFailing to plan is Planning to fail |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-10-24 : 22:16:04
|
| What kind of table are they? Did you get any error message? |
 |
|
|
|
|
|