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
Post a Comment