How to select an empty result set? How to select an empty result set? mysql mysql

How to select an empty result set?


There's a dummy-table in MySQL called 'dual', which you should be able to use.

select    1from    dualwhere    false

This will always give you an empty result.


This should work on most DBs, tested on Postgres and Netezza:

SELECT NULL LIMIT 0;