BETWEEN clause versus <= AND >=

前端 未结 8 1317
無奈伤痛
無奈伤痛 2020-12-14 05:54

Is there a performance difference between using a BETWEEN clause or using <= AND >= comparisons?

i.e. these two queries:

SELECT *  
  FROM table           


        
8条回答
  •  無奈伤痛
    2020-12-14 06:43

    There is no difference.

    Note that BETWEEN is always inclusive and sensitive to the order of the arguments.

    BETWEEN '2010' AND '2005' will never be TRUE.

提交回复
热议问题