I am using postgresql database. I using sequence as a primary key in a table. After inserting a row using preparedStatement, I want to know this auto generated id. For this i am using the jdbc 3 method , pstmt = conn.prepareStatement(query, Statement.RETURN_GENERATED_KEYS);
But the postgresql driver is throwing this exception - Returning autogenerated keys is not supported. please help me to fix this problem.Thanks in advance.
subject: postgresql - How to fix -Returning autogenerated keys is not supported. exception