Mysql数据库增删改查最简单写法

添加数据
insert into User values(1,"lirixing","boy");

查询
select * from User;

更新
update User  set name="liri" where id=1;

删除
delete from User;

查询总条数
select count(1) from User;

查询一个数的和
select sum(id) from User;
posted @ 2022-08-11 18:51  码海兴辰  阅读(22)  评论(0编辑  收藏  举报