Chinaunix首页 | 论坛 | 博客
  • 博客访问: 970235
  • 博文数量: 358
  • 博客积分: 8185
  • 博客等级: 中将
  • 技术积分: 3751
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-15 16:27
个人简介

The views and opinions expressed all for my own,only for study and test, not reflect the views of Any Company and its affiliates.

文章分类

全部博文(358)

文章存档

2012年(8)

2011年(18)

2010年(50)

2009年(218)

2008年(64)

我的朋友

分类: Oracle

2009-06-17 21:51:07

NULL
・order by
null is the highest in rows;
null Last is default for ASC
null first is default for desc
●Defining a Null Value
 ・NULL is a value that is unavailable,unassigned,unknown,or inapplicable;
 ・NULL is not the same as zero or a blank space;
●Null values in Arithmetic Expressions
  ※Arithmatic expressions containing a null value evaluate to null
1
,Groupo By clause can’t contain functions ,like AVG(),MIN(),MAX() and so on;
2,Function AVG(),SUM() can’t be used with DATE data type colunn;
3,NVL2(expr1, expr2, expr3)
       The arguments expr2 and expr3 can have any datatypes except LONG.
4,Alternative Quote(q) Opreator
・Specify your own quotation mark delimiter
・Select any delimiter
・Increase readability and usability
eg:
SQL> select 'this'||q'['s mine]' as sample from dual;

SAMPLE
-----------
this's mine

SQL>
SQL> select 'this'||q'('s mine)' as sample from dual;

SAMPLE
-----------
this's mine

SQL>
SQL> select 'this'||q'['s 'mine]' as sample from dual;

SAMPLE
------------
this's 'mine

SQL> select 'this'||q'{'s '||mine}' as sample from dual;

SAMPLE
--------------
this's '||mine
5,Like operater 
 % 0 or more characters
 _   a character
 ・You can use the ESCAPE identifier to search for the actual % and _symbols;
eg:
SQL> select * from employees where last_name like '%SA\_%' ESCAPE '\';

EMPLOYEE_ID MANAGER_ID FIRST_NAME LAST_NAME  TITLE                    SALARY
----------- ---------- ---------- ---------- -------------------- ----------
         34            fadf       faSA_FADF

6,Rules of Precedence
  1,Arithmetic operators;
   2,Concatenation opreator;||
   3,Comparison conditions;
   4,IS[NOT] NULL,LIKE,[NOT] IN
   5,[NOT]BETWEEN
   6,Not equal to
   7,NOT logical condition
   8,AND logical condition
   9,OR logical condition
  you can user parentheses()to override the Precedence

7,Substitution Variables
  &  遇到一次要求输入一次
  &&存储session 中
  DEFINE variable
  UNDEFINE variable
  set verify ON/OFF

阅读(696) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~