It is very easy to drop an existing MySQL table. But you need to be very
careful while deleting any existing table because data lost will not be
recovered after deleting a table.
A D V E R T I S E M E N T
Syntax:
Here is generic SQL syntax to drop a MySQL table:
DROP TABLE table_name ;
Dropping Tables from Command Prompt:
This needs just to execute DROP TABLE SQL command at mysql> prompt.
Example:
Here is an example which deletes tutorials_tbl:
root@host# mysql -u root -p
Enter password:*******
mysql> use TUTORIALS;
Database changed
mysql> DROP TABLE tutorials_tbl
Query OK, 0 rows affected (0.8 sec)
mysql>
Dropping Tables Using PHP Script:
To drop an existing table in any database you would need to use PHP function
mysql_query(). You will pass its second argument with proper SQL command
to drop a table.
Share And Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
Keywords:
MySQL Drop Table, Mysql Tutorial, Mysql tutorial pdf, history of mysql, basic mysql, syntax use in mysql, mysql software download, learn mysql, mysql insert, mysql delete, mysql data types, mysql administrator.