how to SELECT LAST_INSERT_ID() in java
I need to find out an auto_incrementing amount using LAST_INSERT_ID(). Is there a specific way to get that query executed and returned?
When I use this, I get this value returned.
Resultset resultS = statement.executeQuery("SELECT LAST_INSERT_ID()");
Am I right in assuming that this "119298d" is the value created by AUTO_INCREMENT? If so, how do I seperate it once in the resultset? (next())?
Also, if I want to use that value to create a unique set of results for a group, what type would it be (re)stored in? I'm guessing not an int. varchar(10)?!?
Sorry for all the questions, but this is important I get this done.
Thanks in advance.