why would you use WHERE 1=0 statement in SQL?

后端 未结 12 2206
没有蜡笔的小新
没有蜡笔的小新 2020-12-08 00:48

I saw a query run in a log file on an application. and it contained a query like:

SELECT ID FROM CUST_ATTR49 WHERE 1=0

what is the use of s

12条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-08 01:29

    This may be also used to extract the table schema from a table without extracting any data inside that table. As Andrea Colleoni said those will be the other benefits of using this.

提交回复
热议问题