时间:2021-07-01 10:21:17 帮助过:17人阅读
#查看当前的这张t1表 show create table t1; # 查看所有的表 show tables; # 查看表的详细信息 desc t1;
# modify修改的意思 alter table t1 modify name char(6); # 改变name为大写的NAME alter table t1 change name NAMA char(7);
# 删除表 drop table t1;
# 插入一条数据,规定id,name数据leilei insert t1(id,name) values(1,"mjj01"),(2,"mjj02"),(3,"mjj03");
select id from db1.t1; select id,name from db1.t1; select * from db1.t1;
update db1.t1 set name=‘zhangsan‘; update db1.t1 set name=‘alex‘ where id=2;
delete from t1; delete from t1 where id=2;
基本的mysql语句
标签:title 记录 src name 详细信息 ase 意思 database span