I want to get the value of the last ID insert in a table. How I can do this?
SELECT IDENTITY_VAL_LOCAL() AS VAL FROM SYSIBM.SYSDUMMY1
See docs.