数据库

2019-04-29 SQL 多列IN匹配

2019-04-29  本文已影响0人  刘明_d589

子查询写法:

select * from a where id,type in ( select id,type from b);

子查询方式的代替方式

select * from b where  exists ( select * from a where a.id=b.id and a.type=b.type);

穷举写法:

select * from a where id,type in ((1,2),(,2,2));
上一篇 下一篇

猜你喜欢

热点阅读