sql server 2008 - What is an efficient way to exclude all results from a sql query? -


surprised haven't seen before, googling doesn't yield insight.

i'm working framework going generate sql query, or not. have ability add filtering on query, , case has arisen wish exclude possible results.

my initial thought add where 1 = 0 clause of query.

is there more optimized or efficient way this?

since answer vary between platforms, run on sql server 2008

you correct, best , used way exclude results query:

where 1=0 

Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -