MySQL Logical Operators

MySQL Logical Operators:

(1) AND Operator- MySQL logical AND operator compares two expressions and returns true if both of the expressions are true. AND operator syntax is given below.

SELECT * FROM table_name
WHERE condn1 AND condn2

Example of AND Operator:

mysql and operator query

(2) OR Operator- MySQL logical OR operator compares two expressions and returns TRUE if either of the expressions is TRUE. OR operator syntax is given below.

SELECT * FROM table_name
WHERE condn1 OR condn2

Example of OR Operator:

mysql or operator query

(3) NOT Operator- MySQL logical NOT operator reverses or negates the input. NOT operator syntax is given below.

SELECT * FROM table_name
WHERE condn1 NOT condn2

Example of NOT Operator:

mysql not operator query

Create a Database in MySQL
Create Table in MySQL
MySQL Insert Query (Single Row and Multiple Row)
MySQL Select Query with Where Clause
MySQL– Wikipedia
Spooling and Virtual Devices
Linux- Features and Benefits
Wireless Networking

Comments (No)

Leave a Reply