M
mark.dundon
I may have to migrate the database a Java application uses from MySQL
to DB2. I am currently assessing the impact. One item I'm currently
looking at is that of obtaining the ID of an insert immediately after
the operation.
For example with the MySQL database I would perform the following
command:
long lastInsertedID =
((com.mysql.jdbc.Statement)statement).getLastInsertID();
The statement variable is of type java.sql.Statement.
If I port over to DB2 I am concerned I cannot replace this
functionality. A method such as .getLastInsertID() is not available
from java.sql.Statement.
Is there a solution if I port to DB2?
to DB2. I am currently assessing the impact. One item I'm currently
looking at is that of obtaining the ID of an insert immediately after
the operation.
For example with the MySQL database I would perform the following
command:
long lastInsertedID =
((com.mysql.jdbc.Statement)statement).getLastInsertID();
The statement variable is of type java.sql.Statement.
If I port over to DB2 I am concerned I cannot replace this
functionality. A method such as .getLastInsertID() is not available
from java.sql.Statement.
Is there a solution if I port to DB2?