How does the IN predicate work in SQL?

后端 未结 7 1158
野性不改
野性不改 2020-12-06 16:01

After prepairing an answer for this question I found I couldn\'t verify my answer.

In my first programming job I was told that a query within the IN ()

7条回答
  •  误落风尘
    2020-12-06 16:46

    Yes, but execution stops as soon as the query processer "finds" the value you are looking for... So if, for example the first row in the outer select has Table1Id = 32, and if Table2 has a record with a TableId = 32, then as soon as the subquery finds the row in Table2 where TableId = 32, it stops...

提交回复
热议问题