比如下面的两条语句,使用in关键字和exists关键字实现同样的功能,他们有什么区别?哪个更好一些?selectcount(id)fromt1wheref1in(selectf2fromt2);selectcount(id)fromt1whereexists(select*fromt2wheref2=t1.f1);
selectcount(id)fromt1wheref1in(selectf2fromt2);selectcount(id)fromt1whereexists(select*fromt2wheref2=t1.f1);
selectcount(id)fromt1whereexists(select*fromt2wheref2=t1.f1);
函数式编程
相关分类