I have this query in DB2
SELECT * FROM SOMESCHEMA.SOMETABLE WHERE SYSDATE > @A
If the SYSDATE is NULL, would it be greater than any value of @A, assuming that @A and SOMESCHEMA.SOMETABLE.SYSDATE is a Date data type?
Please help. Thanks in advance.
DB2 Null Handling
That means that all comparison operations will be false because you are comparing an unknown value to something. So no matter which comparison you use (only the IS NULL/IS NOT NULL operation do work!), it will be false.
If you want the query to work you should use something like