Add an IF EXISTS clause to the drop table statement : Drop Table « Table Index « SQL / MySQL






Add an IF EXISTS clause to the drop table statement

       
mysql>
mysql> DROP TABLE IF EXISTS no_such_table;
Query OK, 0 rows affected, 1 warning (0.00 sec)

   
    
    
    
    
    
    
  








Related examples in the same category

1.Dropping Databases
2.Drop table if exists
3.In MySQL, a single DROP TABLE statement can name several tables to be dropped simultaneously
4.Drop more than one table at single statement