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