CREATE TABLE table_name
(
column_name datatype,...
);在建表时复制:
create table table_new as select column1,...|* from table_old;
在添加数据时复制:
insert into table_new [(column1,...)] select column1,...|* from table_old;alter table table_name add column_name datetype;INSERT INTO table_name(column1,column2,...) VALUES(value1,value2,...);alter table table_name modify column_name datatype; alter table table_name rename column column_name to new_name;rename table_name to new_table_name;Update table_name
Set column1=value1,column2=value2,...[where conditions]alter table table_name drop cloumn column_name;删除表中全部数据,速度比DELETE快很多
TRUNCATE TABLE tbl_name;
删除整个表结构
DROP TABLE tbl_name; delete from table_name [where condition];