I use com.mysql.jdbc.Driver
I need insert and get id. My query:
INSERT INTO Sessions(id_user) VALUES(1);
SELECT LAST_INSERT_ID() FROM Sessions LIMIT 1;
error -
Can not issue data manipulation statements with executeQuery()
How insert and get id?