Oracle数据库面试题学校的考试,求答案求思路

2020-09-15 教育 111阅读
  1. select decode(性别字段,'A','男','B','女','未知') as 性别  from 表名     (通过decode函数得到想要的值)

  2. select 购物人 from 购物信息 having count(购物人||商品名称)>1    (count求出购物人购买商品大于1的)

  3. select 姓名,课程,分数 from 成绩表 where 姓名 not in(select 姓名 from 成绩表 where 分数<=60)   (姓名不包含小于60的)

  4. select  t.* from (select name,avg(score)  score from  student)  s,student t

    where s.name=t.name and s.name like '张%'  and  s.score>60   (姓张的大于60的,使用模糊查询,like 以张开头的字段)

  1. select rownum,表.* from 表 where id=要查的id号     (rownum 记录行数)

  2. table3没有图看不到

声明:你问我答网所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系fangmu6661024@163.com