ct.setAutoCommit(false);
ct.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE);
String sql = "insert into orders(usersId,totalPrice,orderDate) values(?,?,now())";
ps=ct.prepareStatement(sql);
ps.setInt(1, user.getId());
ps.setDouble(2, myCar.getTotalPrice());
ps.executeUpdate(); 
sql = "select id from orders" 
ct.commit();前面的sql语句中orders 的id设置了自增长
如何在后面那条sql语句中,查询出orders表中前面那句sql刚刚自增长加入进去id的值,
因为该id是一个外键,需要取出它来进行操作另外一张表