示例mysql> select * from cars where price < (select avg(price) from cars); +------+--------------+---------+| id | name | price |+------+--------------+---------+| 1 | nexa | 750000 || 2 | maruti swift | 450000 || 5 | alto | 250000 || 6 | skoda | 1250000 || 8 | ford | 1100000 |+------+--------------+---------+5 rows in set (0.00 sec)
类似地,子查询也可以与其他比较运算符一起使用。
以上就是mysql 子查询中的比较运算符有什么用?的详细内容。
