-
Notifications
You must be signed in to change notification settings - Fork 0
/
Lecture8.txt
26 lines (23 loc) · 1.34 KB
/
Lecture8.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
Lecture-8:
NOT Operator in SQL || NOT Operator With Example:
NOT Operator: It is used in SQL to provide or to get negative result or used in SQL to get opposite result.
Condition:
X Output
0 1
1 0
Syntax: select *(or use “column_name”) from table_name where NOT condition;
Example: Amazon => Database => Customer
Sl. No. Name Address Age
1. Rupu Agarpara 22
2. Rup Salt Lake, Sector-5 20
3. Rupayan Fulia 24
4. Rupi Newtown 21
Command1: select Name from Customer where NOT Address=”Salt Lake, Sector-5”;
Output1: Rupu, Rupayan, Rupi
NOT use with Between:
Command2: select Name from Customer where NOT Age Between 21 AND 24;
Output2: Rup
NOT use with IN:
Command3: select Name from Customer where NOT Address IN (“Salt Lake, Sector-5”, “Newtown”);
Output3: Rupu, Rupayan
-------×-------