Re: need auto increment value

2006-10-11 Thread Johan Höök
Hello, you can do it in two ways I guess: one is to do a second select (which you don't want): SELECT LAST_INSERT_ID(). another way is to use java.sql.Statement.RETURN_GENERATED_KEYS when you create your Statement, something along these lines: java.sql.PreparedStatement pstmt = myconnec

need auto increment value

2006-10-10 Thread balaraju mandala
Hello Everybody, i want to read the latest value of a autoincrement column from a java program. How can i do this? i want to do this in a single query insertion, is it possible?