The MySQL AND operator is used with SELECT, INSERT, UPDATE or DELETE statements and return TRUE if two or more boolean expressions evaluate to true. The AND operator returns false if one of the two expressions evaluate to false. The AND operators are used to filter records based on more than one condition.
To filter records based on more than one condition, use the following syntax:
Parameters:
tablename: The table name from which you want to fetch the records.
condition: To specifies multiple conditions that must be true to select records.
Note:
In the above example, we are showing how to use the AND
operator to filter records based on more than one condition in SELECT
statement.
You can use MySQL Command Line Client to filter records based on more than one condition is TRUE. It will look like this: