I have been wondering why DB2 SQL statements work even if there are quotes around numeric values.
For example, SELECT * FROM EMPLOYEE WHERE EMPNO = '3'
where EMPNO is a number works as fine as SELECT * FROM EMPLOYEE WHERE EMPNO = 3
? Why is this so? Aren't quotes for characters only?
Because the DB will implicitly cast values if it needs to.
From the v5r3 SQL Reference
What’s new for V5R3