Mysql包含语句(in)用法

假设需要查看table_a表中包含table_b表中id的所有数据:

select * from table_a where id in (select id from table_b);

括号中的语句查出的是table_b中所有的id。

猜你喜欢

转载自blog.csdn.net/qq_38356174/article/details/83012725