SQL/MySQL/Table Index/Drop Table

Материал из SQL эксперт
Перейти к: навигация, поиск

Dropping Databases

/*
mysql> DROP DATABASE MyDatabase;
Query OK, 0 rows affected (0.00 sec)
mysql> Show Databases;
+----------+
| Database |
+----------+
| info     |
| sqle   |
| 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       |
| sqle     |
| 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     |
| sqle   |
| 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;