The MySQL ANY operators allow you to perform a comparison operation, return TRUE if the comparison is TRUE for ANY of the values in the column that the subquery returns.
To perform a comparison operation, return TRUE if any of the subquery values meet the condition, use the following syntax:
Parameters:
tablename: The table name from which you want to perform ANY
operator.
subquery: Usually a SELECT statement starts with SELECT * or column name. MySQL ignores the SELECT list from subquery.
Note:
In the above example, the ANY
operator will return all records from the "tblbankdemataccountcharges" table if it finds ANY records in the "tblbankheadquartersandaddress" table.
You can use MySQL Command Line Client to use ANY
operator in subquery to perform comparison operation. It will look like this: