shihuizhen edited a comment on issue #7922:
URL: https://github.com/apache/shardingsphere/issues/7922#issuecomment-717184273


   @Lucas-307 
   ```
   String sql = "INSERT INTO 
t_order_item(order_id,user_id,status,creation_date) VALUES (2112,21,' init',' 
2017-08-31')";
           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;
           }
   ```
   
   result is -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