摘要:
EXISTS 指定一个子查询,用于检查子查询是否至少会返回一行数据,该子查询实际上并不返回任何数据,而是返回值True或False,检测行的存在。语法:EXISTS subquery。参数 subquery 是一个受限的 SELECT 语句 (不允许有 COMPUTE 子句和 INTO 关键字)。结果类型为 Boolean,如果子查询包含行,则返回 TRUE。上述的功能在T-SQL中可以直接使用,但是在PL/SQL中,会出现如下的问题:1 BEGIN2 IF EXISTS(SELECT * FROM EMP) THEN3 DBMS_OUTPUT.PUT_LINE();4 ELS... 阅读全文
posted @ 2012-01-11 16:54
Coldest Winter
阅读(845)
评论(0)
推荐(0)
摘要:
SCN的概念:http://www.itpub.net/thread-1601493-1-1.html查询当前的系统的时间戳:1 select SysTimeStamp from DUAL;NOTE--Oracle uses undo to roll back transactions and support flashbackqueries. Oracle uses redo (captured in the online redo log files) toapply transactions during database recoveries.NOTE--To use some fea 阅读全文
posted @ 2012-01-11 16:25
Coldest Winter
阅读(618)
评论(0)
推荐(0)
摘要:
The following example searches the string "CORPORATE FLOOR", beginning with the third character, for the string "OR". It returns the position in CORPORATE FLOOR at which the second occurrence of "OR" begins:SELECT INSTR('CORPORATE FLOOR','OR', 3, 2) &quo 阅读全文
posted @ 2012-01-11 15:29
Coldest Winter
阅读(961)
评论(0)
推荐(0)
浙公网安备 33010602011771号