In MySQL operators are used to further facilitate work with statements and clauses, and help they filter the retrieved values better.
Here is the list of MySQL operators:
| OPERATOR | DESCRIPTION |
|---|---|
| ALL | Allows comparisons with all the values given in a condition |
| AND | Produces a result of a query if two or more of given conditions are met |
| ANY | Allows comparisons with any of the values given in a condition |
| AS | Used to specify an alternate or an alias name for a column or a table |
| ASC | Used to order data by an ascending direction |
| BETWEEN | Specifies a range of data to test the retrieved values against. Frequently used with the WHERE clause |
| ENABLE | Enables (re-enables) an event |
| EXISTS | Used for quick verification of data existence (tables and databases as well). Faster than ALL and ANY. |
| DESC | Used to order data by a descending direction |
| DETERMINISTIC | Used for testing inputs in stored procedures |
| DISTINCT | Used to retrieve only "distinct" records from the database |
| IDENTIFIED BY | Used in combination with CREATE USER (or similar) for the user identification |
| IN | Determines if a specified value matches any values returned by the query |
| IN | OUT | INOUT | Used in stored procedures to verify or retrieve parameters from a procedure |
| IS NOT NULL | Verifies if the returned value is not null. Useful for data validity check |
| IS NULL | Verifies if the returned value is null. Useful for data validity check |
| LIKE | Very popular operator used in simple and complex search forms. It compares the query with a string or some other form of condition and retrieves the value |
| NOT | Used in queries looking for negation of the given condition. Often used with the operator LIKE |
| NOT DETERMINISTIC | Indicates that the result of a called procedure is not produced for that particular input |
| NOT EXISTS | Used for a quick negative verification of data existence (tables and databases as well). Faster than ALL and ANY. |
| OR | Produces a result of a query if any of given conditions is met |
| SOME | Alias to ANY. See the manual for SOME |
| UNION | Combines (joins) two queries that have equal number of columns and data types |
| UNION ALL | Compares the validity of two table's data and combines (joins) them between two databases |
Comments
No comments have been made yet.
Please login to leave a comment. Login now