1.

The value of recently generated sequence number can be obtained by ____________(a) LAST_INSERT_ID()(b) LATEST_INSERT_ID()(c) INITIAL_INSERT_ID()(d) INSERT_ID()I got this question during an online interview.The query is from Working with Sequences topic in division Data Types of MySQL

Answer»

The correct CHOICE is (a) LAST_INSERT_ID()

EASIEST explanation: The value of most recently generated SEQUENCE number can be obtained by CALLING the LAST_INSERT_ID() function. This enables to reference the AUTO_INCREMENT value in the subsequent statement.



Discussion

No Comment Found

Related InterviewSolutions