Dropping Databases
/*
mysql> DROP DATABASE MyDatabase;
Query OK, 0 rows affected (0.00 sec)
mysql> Show Databases;
+----------+
| Database |
+----------+
| info |
| java2s |
| mysql |
| t |
| test |
| ttt |
+----------+
6 rows in set (0.00 sec)
mysql> CREATE DATABASE MyDatabase;
Query OK, 1 row affected (0.00 sec)
mysql> Show Databases;
+------------+
| Database |
+------------+
| info |
| java2s |
| mydatabase |
| mysql |
| t |
| test |
| ttt |
+------------+
7 rows in set (0.00 sec)
mysql> DROP DATABASE MyDatabase;
Query OK, 0 rows affected (0.00 sec)
mysql> Show Databases;
+----------+
| Database |
+----------+
| info |
| java2s |
| mysql |
| t |
| test |
| ttt |
+----------+
6 rows in set (0.00 sec)
*/
DROP DATABASE MyDatabase;
Show Databases;
CREATE DATABASE MyDatabase;
Show Databases;
DROP DATABASE MyDatabase;
Show Databases;
Related examples in the same category