首页 > 数据库技术 > 详细

sql笔试题

时间:2019-04-27 23:31:28      阅读:122      评论:0      收藏:0      [点我收藏+]

笔试题1:

技术分享图片

1、select * from tablex where name = "张*" order by age  默认升序

     select * from tablex where name contains ”张“ order by  age desc 降序

 

2   select name from tablex ,tabley where tablex.code=tabley.code
and class="计算机" and score<60;

 

3  select name ,class,score from tablex ,tabley where tablex.code=tabley.code

 select name ,class,score from tablex  inner join  tabley   on  tablex.code=tabley.code

 

 

4 select name ,class,score from tablex lift join tabley on tablex.code=tabley.code

 

5  insert into tablex(code,name,age)values("97005","赵六",“20”)

 

6  update tablex set age =21 where code =97004

 

 
7  delete  * from tablex where code not in (select code form tabley where score is null )   # not  in 语句容易出bug

 

sql笔试题

原文:https://www.cnblogs.com/qiyuedetiankong/p/10781017.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!