邱琦雯老公,6月思想汇报,无国界浏览器
--查询20<=age<=21的学生数据 select * from student where age between 20 and 21
--查询年龄是20或21的学生数据 select * from student where age in (20,21)
%
匹配任意多个字符;_
匹配任意单个字符;--姓氏为张的学生,张二,张三,张四五都符合条件 select * from student where name like '张%'; --名字含有三的 select * from student where name like '%三%'; --姓氏为张,名字只有两个字的学生 select * from student where name like '张_'; --名字中包含%号的 select * from student where name like '%\%%' escape '\' ;
与,或
-- 查询student表中你的num和name列,并把这两列显示出来 select num||,||name from student
下一章《高级查询》再讲
a)union 联合,将两个查询结果拼起来
b)union all 联合所有,多出现重复行
c)intersect 交集
d)minus 减集
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
Oracle字符串函数length、upper、lower、initcap、 concat、instr、replace
网友评论