Question: I want to get the value of the last ID insert in a table. How I can do this?

Answer: 
Well the solution that I use is:

```
select id from NEW TABLE (insert into (val1, val2, ...) values ('lorem', 'ipsum', ...))

```

This gets the id column from the last row inserted in the DB :)
```
SELECT IDENTITY_VAL_LOCAL() AS VAL FROM SYSIBM.SYSDUMMY1

```

See [docs](http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.sql.ref.doc/doc/r0004231.html).