标签:com code sql 类型 rom 部分 sel ble 表名
Create table 表名 ((列名,数据类型),(列名,数据类型),(列名,数据类型),(列名,数据类型),);
Alter table tableName add column columName columnType comment ‘注释‘ ;
alter table author add column name varchar(20) comment ‘注释‘;
Alter table tableName change column columnName newColumnName columnType;
alter table author change column name names varchar(20);
Alter table tableName modify column columnName columnType comment ‘注释‘;
alter table author modify column names varchar(10);
Alter table tableName drop column columnName;
alter table author modify column names varchar(10);
Alter table tableName rename to newTableName;
alter table author rename to authors;
Create table select * from oldtable;
create copy3 select * from authors;
Create table newTable select column1,column2,column3 from oldtable;
create table copy2 select id,author from authors;
Alter table newTableName like tableName;
create table copy like authors;
drop table table1,table2,table3;
案例:
drop table copy,copy2,copy3;
标签:com code sql 类型 rom 部分 sel ble 表名
原文地址:https://www.cnblogs.com/yuknight/p/12722489.html