数据库小试题2

数据库小试题2,第1张

概述世纪佳缘网面试题1.统计每个分类(type)有多少人:select type,count(type) from tab_user group by type;2.统计五个人的总分(score)是多少:select sum(score) from tab_user;3.按照分数(score)选出前三名,倒序排列:select * from `tab_user` order by score desc limit 3;4.插入数据:小明(name),4(type),30(score);insert into `tab_user` (name,type,score) values ('小明','4','30');5.更新50分一下(不含50分)的分数(score)为60;update `tab_user` set score = 60 where score<50;6.删除分数(score)60分一下的数据。DELETE from `tab_user` where score <60;

世纪佳缘网面试题

1.统计每个分类(type)有多少人:

select type,count(type) from tab_user group by type;

2.统计五个人的总分(score)是多少:

select sum(score) from tab_user;

3.按照分数(score)选出前三名,倒序排列:

select * from `tab_user` order by score desc limit 3;

4.插入数据:小明(name),4(type),30(score);

insert into `tab_user` (name,type,score) values ('小明','4','30');

5.更新50分一下(不含50分)的分数(score)为60;

update `tab_user` set score = 60 where score

6.删除分数(score)60分一下的数据。

DELETE from `tab_user` where score 总结

以上是内存溢出为你收集整理的数据库小试题2全部内容,希望文章能够帮你解决数据库小试题2所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/sjk/1169397.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-02
下一篇 2022-06-02

发表评论

登录后才能评论

评论列表(0条)

保存