<-- Chapter 8: SQL = Operator
Chapter 9
SQL != Operator
Lets see an example from the below table "employees" :-
employee_id |
name |
code |
designation |
salary |
101 |
ABC |
E-101 |
Engineer |
12000 |
102 |
DEF |
E-102 |
Doctor |
8000 |
103 |
GHI |
E-103 |
Software Developer |
8000 |
104 |
JKL |
E-104 |
CEO |
12000 |
105 |
MNO |
E-105 |
Software Developer |
100000 |
!= operator example :-
SELECT *
FROM `employees`
WHERE `name` != 'ABC';
Now Run this Query, we will see the output below :-
employee_id |
name |
code |
designation |
salary |
102 |
DEF |
E-102 |
Doctor |
8000 |
103 |
GHI |
E-103 |
Software Developer |
8000 |
104 |
JKL |
E-104 |
CEO |
12000 |
105 |
MNO |
E-105 |
Software Developer |
100000 |
We can see here, that only those Records are displayed whose name column value is not equal to 'ABC'
Chapter 10: SQL LIKE Operator -->
0 Comment(s)