-- not in 的替代写法
select col from table1 where col not in
(select col from table2);
select col,table2.col temp_col
from table1 left join table2
on table1.col = table2.col
where temp_col is null;
-- in 的替代写法
select col from table1 where col in
(select col from table2);
select col,table2.col temp_col
from table1 left join table2
on table1.col = table2.col
where temp_col is not null;
Oracle中的数据类型和数据类型之间的转换
Oracle中的数据类型 /* ORACLE 中的数据类型: char 长度固定 范围:1-2000 VARCHAR2 长度可变 范围:1-4000 LONG 长度可变 最大的范围2gb 长字符类型 ...
Oracle中使用escape关键字实现like匹配特殊字符,以及&字符的转义
转:http://blog.chinaunix.net/uid-26896647-id-3433968.html 问题描述:如果在一个表中的一个字段上存在'&', '_', '%'这样的特 ...
oracle中sql语句的优化
oracle中sql语句的优化 一.执行顺序及优化细则 1.表名顺序优化 (1) 基础表放下面,当两表进行关联时数据量少的表的表名放右边表或视图: Student_info (30000条数据)D ...
oracle中110个常用函数介绍
1. ASCII 返回与指定的字符对应的十进制数; SQL> select ascii(A) A,ascii(a) a,ascii(0) zero,ascii( ) space from dua ...
Oracle中dblink如何使用
Oracle中dblink应用小结Oracle应用服务器OS 1.查看数据库的global_name SELECT * FROM GLOBAL_NAME; 2.查看global ...
ORACLE中dba,user,v$等开头的常用表和视图
一.Oracle表明细及说明1.dba_开头表 dba_users 数据库用户信息 dba_segments 表段信息 dba_extents ...
oracle中next_day()、last_day()函数解析
oracle中next_day()函数解析 Sql代码 当前系统时间的下一星期一的时间select next_day(sysdate,1) from dual NEXT_DAY(date,char ...
ORACLE中查询语句的执行顺及where部分条件执行顺序测试