一丶增

创建表

create table 表名(

       列名 数据类名,

       列名 数据类名,

       列名 数据类名,

)

二丶删

删除表

drop table 表名;

三丶改

1丶添加一列:
alter table 表名 add column 列名 数据类名;
2丶删除字段(删除一列)
alter table 表名 drop column 列名;
3丶修改字段的数据类型:
alter table 表名 modify column 列名 新的数据类名;
4丶改表名:
alter table 表名 rename to 新表名

四丶查

1丶查所有表(只是显示本库里面的表)

show tables;

2丶 查表结构

desc 表名;

posted on 2019-12-03 10:00  二三旧友  阅读(143)  评论(0编辑  收藏  举报