Setting Auto increment problem :(-:
I have a problem with my java apllication that i am unable to create a enitity persistence class..
The problem is that it does not takes the database table for entity class that doesn't have PRIMARY KEY..
I found a way for it by applying PRIMARY KEY as AUTOINCREMENT column..
But, since my application is to be work continuosly with database i cannot estimate a typical auto-increment value limit..
Now what i want is to apply a composit primary key with "date" , "id" column as primary keys together, the "id" must be a AUTO-INCREMENT value that can reset itself from the begening whenever a day changes , i.e, id values resets itself after each day ??
How can i achive this ??
What i tried is like something as follows::
But it does not yeild me required result...Any suggestions please????
create table test (
id int(4) zerofill auto_increment,
primary key (mydate,id)
insert into test (mydate)