![]() (You can specify the initial value and interval for these auto-incremented columns). ![]() When you insert the next record using the INSERT statement the ID value of the new record will be 7 and the ID value of its next record will be 8. These will be generated automatically.įor example, in a table if we have a column with name ID and data type INT, which is auto-incremented and, if we already have 6 records in that table. While inserting records in a table there is no need to insert value under the auto-incremented column. In MySQL database you can declare a column auto increment using the following syntax. Various databases support this feature in different ways. While creating a table, in certain scenarios, we need values to column such as ID, to be generated/incremented automatically.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |