摘要: 1、Where子句中的连接顺序:ORACLE采用自下而上的顺序解析WHERE子句。根据这个原理,表之间的连接必须写在其他WHERE条件之前, 那些可以过滤掉最大数量记录的条件必须写在WHERE子句的末尾。举例:(低效)select ... from table1 t1 where t1.sal > 300 and t1.jobtype = '0001' and 20 < (select... 阅读全文
posted @ 2009-12-13 23:11 是旧卡 阅读(849) 评论(0) 推荐(0) 编辑
摘要: Oracle 中不支持以下3中写法:1. select * from emp where ename like '[ABC]%'; 2. select * from emp where ename like '[A-D]%'; 3. select * from emp where ename like '%[%]%';要在Oracle中实现以上语句的功能,可以用如下写法:1. select *... 阅读全文
posted @ 2009-12-13 16:46 是旧卡 阅读(819) 评论(0) 推荐(0) 编辑