Lucas-307 commented on issue #7922:
URL: https://github.com/apache/shardingsphere/issues/7922#issuecomment-717074707


   @shihuizhen Do you use jdbc?
   
   ```java
   try (Connection conn = DriverManager.getConnection(url, username, password);
       PreparedStatement ps = conn.prepareStatement(sql, 
Statement.RETURN_GENERATED_KEYS)) {
       ps.executeUpdate();
       ResultSet rs = ps.getGeneratedKeys();
       return rs.next() ? rs.getLong(1) : -1;
   }
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to