SQL 5
SQL 5
SQL 5
note:
in place of or operator we can use in operator,in operator
performance is very high compared to or operator
null:
NULL+100
----------
0+0
----------
0
nvl:
nvl is orcale predefined function used in place of null
value,it always accepts two perameters
syntax:
nvl(exp1,exp2);
NVL(10,20)
----------
10
NVL(NULL,20)
------------
20
NVL(NULL,0)
-----------
0
900+0
----------
900
nvl2():
oracle 9i introduced nvl2(),this function accepts
3 perameters
syntax:
nvl2(exp1,exp2,exp3);
NVL2(NULL,20,30)
----------------
30
cond1:
1.if comm is null then update comm to null
2.if comm is not null then update comm to comm+500
special operators:
in-not in
between-not between
is null-is not null
like-not like
in:
it is used to pick the values one by one
syntax:
select * from tablename where columnname in(list of values);
note:
in all databases not in operator doesnot work with
null values
no rows selected