比如下面的兩條語句,使用in關(guān)鍵字和exists關(guān)鍵字實現(xiàn)同樣的功能,他們有什么區(qū)別?哪個更好一些?selectcount(id)fromt1wheref1in(selectf2fromt2);selectcount(id)fromt1whereexists(select*fromt2wheref2=t1.f1);
數(shù)據(jù)庫:in和exists區(qū)別?
手掌心
2019-04-16 20:27:46