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
This is very good in metadata fetching and makes thing generic. Many DBs have optimizer so they will not actually execute it but its still a valid SQL statement and should execute on all DBs. This will not fetch any result, but you know column names are valid, data types etc. If it does not execute you know something is wrong with DB(not up etc.) So many generic programs execute this dummy statement for testing and fetching metadata.