如何在 FROM 子句中使用 MySQL 子查询作为表?
摘要:
...
mysql> Select * from Cars; +------+--------------+---------+ | ID | Name | Price | +------+--------------+---------+ | 1 | Nexa | 750000 | | 2 | Maruti Swift | 450000 | | 3 | BMW | 4450000 | | 4 | VOLVO | 2250000 | | 5 | Alto | 250000 | | 6 | Skoda | 1250000 | | 7 | Toyota | 2400000 | | 8 | Ford | 1100000 | +------+--------------+---------+ 8 rows in set (0.02 sec) mysql> Select * FROM ( Select Name, Price from Cars Where Price > 200000) C_car WHERE Name = 'Nexa'; +------+--------+ | Name | Price | +------+--------+ | Nexa | 750000 | +------+--------+ 1 row in set (0.00 sec)
以上就是如何在 FROM 子句中使用 MySQL 子查询作为表?的详细内容,更多请关注其它相关文章!