mysql创建和删除表

创建表
简单的方式

CREATE TABLE person (
number INT(11),
name VARCHAR(255),
birthday DATE
);
CREATE TABLE IF NOT EXISTS person (
number INT(11),
name VARCHAR(255),
birthday DATE
);

查看表所有的列:

SHOW FULL COLUMNS from person;
+----------+--------------+-----------------+------+-----+---------+-------+---------------------------------+---------+
| Field    | Type         | Collation       | Null | Key | Default | Extra | Privileges                      | Comment |
+----------+--------------+-----------------+------+-----+---------+-------+---------------------------------+---------+
| number   | int(11)      | NULL            | YES  |     | NULL    |       | select,insert,update,references |         |
| name     | varchar(255) | utf8_general_ci | YES  |     | NULL    |       | select,insert,update,references |         |
| birthday | date         | NULL            | YES  |     | NULL    |       | select,insert,update,references |         |
+----------+--------------+-----------------+------+-----+---------+-------+---------------------------------+---------+

删除表

DROP TABLE  tbl_name;
DROP TABLE IF EXISTS tbl_name;
原文地址:https://www.cnblogs.com/laohaozi/p/8266568.html