DROP tablename;
Mysql tutorial>
Mysql> create table Employee (
-> Id int,
-> First_name VARCHAR (15 ),
-> Last_name CHAR (15 ),
-> Start_date DATE,
-> End_date DATE,
-> Salary FLOAT (8, 2 ),
-> City VARCHAR (10 ),
-> Description VARCHAR (15)
-> );
Query OK, 0 rows affected (0.06 sec)
Mysql>
Mysql> show tables;
+ ---------------- +
| Tables_in_test |
+ ---------------- +
| Employee |
+ ---------------- +
1 row in set (0.00 sec)
Mysql>
Mysql> DROP table employee;
Query OK, 0 rows affected (0.01 sec)
Mysql>
Mysql> show tables;
Empty set (0.00 sec)
Good Code
Mysql>
Mysql> show tables;
Empty set (0.05 sec)
Mysql>
Mysql> create table Employee (
-> Id int,
-> First_name VARCHAR (15 ),
-> Last_name VARCHAR (15 ),
-> Start_date DATE,
-> End_date DATE,
-> Salary FLOAT (8, 2 ),
-> City VARCHAR (10 ),
-> Description VARCHAR (15)
-> );
Query OK, 0 rows affected (0.03 sec)
Mysql>
Mysql> show tables;
+ ---------------- +
| Tables_in_test |
+ ---------------- +
| Employee |
+ ---------------- +
1 row in set (0.00 sec)
Mysql>
Mysql>
Mysql> drop table employee;
Query OK, 0 rows affected (0.02 sec)