Home » MYSQL » Using Sequences » Question
  1. When no AUTO_INCREMENT value has been generated during the current connection, LAST_INSERT_ID() returns ____________.
    1. 2
    2. 1
    3. 0
    4. -1
    5. None of these
Correct Option: C

The ‘LAST_INSERT_ID()’ function returns zero when no ‘AUTO_INCREMENT’ value has been generated during the current connection with the server. It is tied to the current connection.



Your comments will be displayed only after manual approval.