Program 4
Write a program to show the use of where command using logical,
relational operator.
1. Logical operator:
a. and (&&):
mysql> select * from bca
-> where name="mehak" && marks="489";
b. or (||):
mysql> select * from bca
-> where name="mehak" || marks<="400";
c. not (!):
mysql> select * from bca
-> where name!="mehak";
2. Relational operator:
a. Less than (<):
mysql> select * from bca
-> where marks<"410";
b. More than (>):
mysql> select * from bca
-> where marks>"410";
c. Less than equal to (<=):
mysql> select * from bca
-> where marks<="398";
d. More than equal to (>=):
mysql> select * from bca
-> where marks>="398";
e. Not equal to (!=):
mysql> select * from bca
-> where marks!="500";