w66利来国际·(中国游)官方网站

mysql简单的操作

发表日期:2021-07-21 文章编辑:利来国国际网络 文章来源:深圳网站建设

mysql简单的操作

增 insert
insert into t5(username) values('user1');
删 delete
删所有
delete from t5;
删一条
delete from t5 where id=10;
删除1<=id<=3
delete from t5 where id>=1 and id<=3;
删除id为1,3,5
delete from t5 where id=1 or id=3 or id=5;
delete from t5 where id in(1,5,3);
改 update
修改所有
update t5 set username='9';
修改一条
update t5 set username='9' where id=9;
修改某一条中的多个字段的数据(用逗号分开)
update t5 set username='9',age=20 where id=9;
查 select
查所有
select * from t5;
查一条数据
select *from t5 where id=9;

您的浏览器版本太低

请升级您的浏览器:  或以下浏览器:  /   /