MySQL Tutorial/Table/Drop Table — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
(нет различий)
|
Текущая версия на 12:49, 26 мая 2010
Dropping Tables
To delete an existing table, type
<source lang="sql">
DROP tablename;</source>
To remove the whole table
<source lang="sql">
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) mysql> mysql> show tables; Empty set (0.00 sec) mysql> mysql></source>