-
Notifications
You must be signed in to change notification settings - Fork 0
/
Feb 12 2020.txt
84 lines (51 loc) · 1.61 KB
/
Feb 12 2020.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
select * from emp;
-- null treatment
-- with null, we can't perform any type task (arithmetic ,boolean)
select 10+10 from dual;
select 10-10 from dual;
select 10+null from dual;
select 'jitendra' from dual;
select 'oracle';
select 'oracle' from ;
select 'oracle',10+2 from emp;
select oracles from emp;
select * from naveen;
select naveen from emp;
select * from dual;
select 'X','Y','Z' from dual
union all
select 'X','Y','Z' from dual
union all
select 'X','Y','Z' from dual
union all
select 'X','Y','Z' from dual;
-- null value
select null + 10 from dual;
select 10/0 from dual;
select null/0 from dual;
-- beelean operator
select * from emp where deptno=null;
select * from emp where deptno>null;
select * from emp where 1=1;
select * from emp where null=null;
select * from emp;
select deptno from emp;
select * from emp where comm=0;
select * from emp where comm>0;
select * from emp where comm=null; -- is (special operator)
select * from emp where comm is null;
select * from emp where comm is not null;
select * from emp where ename is null;
select * from emp where ename not like 'A%';
select * from emp where job='ANALYST' and sal=3000;
select * from emp where job='ANALYST' or sal=3000;
select ename,sal from emp where job='ANALYST' or sal=3000;
-- Testing
--
create table demo_char_varchar_01
(
name1 char(10),
name2 varchar(10));
insert into demo_char_varchar_01 values('Oracle','Oracle');
select length(name1),name1,length(name2),name2 from demo_char_varchar_01;
insert into demo_char_varchar_01 values('O','O');