On 10/07/2017 09:11, Paul Reeves wrote: > While I was studying this sort of query: > > SELECT * FROM employee e > WHERE e.EMP_NO = coalesce ( ?, e.EMP_NO) > > it became obvious that if the parameter is null it resolves to this > sort of query: > > SELECT * FROM employee e > WHERE e.EMP_NO = e.EMP_NO > > which produces the same result set as > > SELECT * FROM employee e > > Only when e.EMP_NO is NOT NULL.
The query is really similar to: SELECT * FROM employee e where e.EMP_NO is not null Adriano ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel