DBA > Job Interview Questions > MySQL and SQL

How do you find out which auto increment was ass

More DBA job interview questions and answers at http://dba.fyicenter.com/Interview-Questions/

(Continued from previous question...)

How do you find out which auto increment was assigned on the last insert?

SELECT LAST_INSERT_ID() will return the last value assigned by the auto_increment function. Note that you don’t have to specify the table name.

(Continued on next question...)

Other Job Interview Questions