Where does the practice “exists (select 1 from …)” come from?

前端 未结 4 775
无人及你
无人及你 2020-12-03 07:51

The overwhelming majority of people support my own view that there is no difference between the following statements:

SELECT * FROM tableA WHERE EXISTS (SELE         


        
4条回答
  •  醉话见心
    2020-12-03 08:07

    This question has an answer that says it was some version of MS Access that actually did not ignore the field of the SELECT clause. I have done some Access development, and I have heard that SELECT 1 is best practice, so this seems very likely to me to be the source of the "myth."

    Performance of SQL EXISTS usage variants

提交回复
热议问题