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!

Drop specified tables

Status
Not open for further replies.

blekfis

Programmer
Oct 19, 2001
38
SE
Hi,
How do I drop specified tables? I know I can use drop table '****' , but I want to drop 70 out of 75 tables... Is there an easy way (in PHPmyadmin)??

/Newbie-N!cklas
 
Drop the database and recreate the database and 5 tables.

Or write a sql script that says:
Drop table name of table 1;
Drop table name of table 2;
etc

then run the script.

c:>mysql -u username password databasename< sqlscript.sql
or
[user@hostname]mysql -u username password databasename< sqlscript.sql

Let me know how it turns out!
NixerX
kernel_Killer@hotmail.com

 
Thanx for the tip, but it's already been solved...
In PHPmyadmin I marked all the tables in my db, then copied them into Textpad, changed all 'space' to ',' and just run what I got in myadmin after drop table. Like this &quot;drop table ***, ****, ****&quot;. Maybe it's not the best way, but it worked for me and was kinda easy!!

/N!cklas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top