如何使用 MySQL IN() 函数比较行构造器?
我们还可以使用 IN() 函数比较行构造器。考虑以下示例以使其更清晰 -
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)
广告