
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
How can I use MySQL IN() function to compare row constructors?
We can also use IN() function to compare row constructors. Consider the following example to make it clearer −
mysql> Select (10,2) IN ((5,10),(10,2),(2,10),(100,100)); +--------------------------------------------+ | (10,2) IN ((5,10),(10,2),(2,10),(100,100)) | +--------------------------------------------+ | 1 | +--------------------------------------------+ 1 row in set (0.00 sec) mysql> Select (10,2) IN ((5,10),(2,10),(100,100)); +-------------------------------------+ | (10,2) IN ((5,10),(2,10),(100,100)) | +-------------------------------------+ | 0 | +-------------------------------------+ 1 row in set (0.00 sec)
- Related Articles
- How can I use another MySQL function/s with REPEAT() function?
- How can I use SPACE() function with MySQL WHERE clause?
- How can I use MySQL IF() function within SELECT statement?
- How can I use TIME_FORMAT() function to offload time/date values in MySQL?
- How can I use IFNULL() function at the place of COALESCE() function in MySQL?
- How can I use 2-digit year value in MySQL DATEDIFF() function?
- How can we use MySQL SUM() function?
- How can I use MySQL INTERVAL() function with a column of a table?
- How can I customize value, instead of NULL, of a row by using MySQL IF() function?
- How can I use RAND() function in an ORDER BY clause to shuffle MySQL set of rows?
- How can I use a SELECT statement as an argument of MySQL IF() function?
- How can I select the row with the highest ID in MySQL?
- How can I use MySQL OCTET_LENGTH() function to count the number of characters stored in a data column?
- How can we use MySQL self-computed output from any expression, function etc. for inserting values in a row?
- How to use a Boolean in JavaScript Constructors?

Advertisements