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

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -