List
Subject: RE: create own auto increment number
Are you talking about a multiple key PRIMARY KEY?
CREATE TABLE Blah
(
MyDate datetime,
MyID INT NOT NULL AUTO_INCREMENT,
...
PRIMARY KEY (MyDate,MyID)
)
for each unique MyDate the Auto Increment sequence will start
as:
SELECT CONCAT(id_field,'-',date_field) AS ID,
.
--
Diana Soares
-Original Message-
From: Ron McKeever [mailto:[EMAIL PROTECTED]
Sent: Tue 11/25/2003 1:43 PM
To: Chris
Cc: mysql
Subject:RE: create own auto increment number
Chris,
Thats not what i think im Asking
On Tue, 2003-11-25 at 13:15, Diana Cristina Neves Soares wrote:
I think it is not possible to have things as you stated, but you could have an
auto_increment field and a date field in your table.
Every time you insert a record, you set the date field and the other field will
auto_increment
Are you talking about a multiple key PRIMARY KEY?
CREATE TABLE Blah
(
MyDate datetime,
MyID INT NOT NULL AUTO_INCREMENT,
...
PRIMARY KEY (MyDate,MyID)
)
for each unique MyDate the Auto Increment sequence will start over.
If that's not what you're asking for,