![]() ![]() ![]() The most recent auto-generated ‘AUTO_INCREMENT value can be retrieved using the ‘LAST_INSERT_ID()’ function in SQL or using the ‘mysql_insert_id()’ which is a C API function. When any value is inserted into an AUTO_INCREMENT column, the column gets set to that value, and the sequence also gets reset so that it generates values automatically, in the sequential range from largest column value.Īn existing ‘AUTO_INCREMENT’ column can be updated that will reset the ‘AUTO_INCREMENT’ sequence as well. ![]() If a column is declared as ‘NOT NULL’, it is possible to assign NULL to that column to generate a sequence of numbers. The AUTO_INCREMENT attribute is used to generate a unique identify for new rows. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |