Jump to content

Changing Auto-Increment Value


elioncho

Recommended Posts

HI, I have a table that looks something like this:

CREATE TABLE orders(
  ID            INT(5) AUTO_INCREMENT NOT NULL,
  name        VARCHAR(40) NOT NULL,
  date        DATE NOT NULL,
PRIMARY KEY(ID,date) )

I want to change the value of ID to 1 again after certain time. What MySQL query can I use to make the field ID begin autoincrementing from number 1 again. Thanks..
Link to comment
https://forums.phpfreaks.com/topic/23460-changing-auto-increment-value/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.