an efficient way to test if a table row exists

后端 未结 5 1636
迷失自我
迷失自我 2020-12-20 04:07

I\'m trying to find the most efficient way to determine if a table row exists.

I have in mind 3 options:

  1. SELECT EXISTS(SELECT 1 FROM table1 WHERE so

5条回答
  •  天命终不由人
    2020-12-20 04:18

    Exists is faster because it will return the number of results that match the subquery and not the whole result.

提交回复
热议问题