Oracle查询练习1

练习二:基本查询与操作符1、查询所有学员信息select * from StudentInfo;2、查询所有学员的姓名,年龄(要求列名用中文显示)select stuName 姓名,stuAge 年龄 from StudentInfo;3、查询学员的年龄共有哪几种值(要求不计算重复项)select distinct stuAge from StudentInfo;4、查询所有女性学员的信息sele...
摘要由CSDN通过智能技术生成
练习二:基本查询与操作符
1、查询所有学员信息
select * from StudentInfo;
2、查询所有学员的姓名,年龄(要求列名用中文显示)
select stuName 姓名,stuAge 年龄 from StudentInfo;
3、查询学员的年龄共有哪几种值(要求不计算重复项)
select distinct stuAge from StudentInfo;
4、查询所有女性学员的信息
select * from StudentInfo where stuSex='女';
5、查询前三个学员的信息(要求使用rownum)
select * from StudentInfo where rownum<=3;
6、查询学员信息,要求显示效果如下:
select '姓名'||stuName||',年龄'||stuAge||',家住'||stuAddress 学员信息 from StudentInfo;
7、查询年龄小于20岁,家住长沙的男性学员信息
select * from StudentInfo where stuSex='男' and stuAge<20 and stuAddress like '%长沙%';
8、查询年龄在16-18岁(包括16,18岁)的学员信息
select * from StudentInfo where stuAge between 16 and 18;
9、查询身份证中包含有‘1989’字符的学员信息
select * from StudentInfo where stuCard like '%1989%';
10、查询‘2007-3-
  • 4
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值