Why would someone use WHERE 1=1 AND in a SQL clause?

后端 未结 19 1989
甜味超标
甜味超标 2020-11-22 07:08

Why would someone use WHERE 1=1 AND in a SQL clause (Either SQL obtained through concatenated strings, either view definition)

I\'ve

19条回答
  •  清酒与你
    2020-11-22 07:45

    where 1=0, This is done to check if the table exists. Don't know why 1=1 is used.

提交回复
热议问题