Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleting Tables From Maser DB

Status
Not open for further replies.

xlu21

Technical User
Sep 5, 2007
23
US
First Question.
To copy a database, will import data be the same as copy.

Second Question.
I did a data import from a database but I orverlooked at the step that asks you where you want to import to.
So it import all my tables into the master database.
Is there a way to delete those tables with out doind it one by one? There are over 500 tables...
 
For your first question the answer is yes.

For your second. What version of SQL is it. I would create script that creates a drop script.

something like this.

select distinct 'DROP TABLE '+table_name
from master.information_schema.columns

- Paul
- If at first you don't succeed, find out if the loser gets anything.
 
I should also mention that from within SSMS you can highlight all the tables you want to drop and select delete.

- Paul
- If at first you don't succeed, find out if the loser gets anything.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top