Is there a way in mysql to auto increment an ID when the date is changed?
I have a table like this and the id must be auto increment when the day is changed.
ID | Name | Date Time |
---|---|---|
1 | Adi | 2022-06-29 17:00:00 |
1 | Adi | 2022-06-29 17:00:00 |
1 | Adi | 2022-06-29 17:00:00 |
2 | Adi | 2022-06-30 17:00:00 |
2 | Adi | 2022-06-30 17:00:00 |
3 | Adi | 2022-07-01 17:00:00 |
3 | Adi | 2022-07-01 17:00:00 |
4 | Adi | 2022-07-02 17:00:00 |
4 | Adi | 2022-07-02 17:00:00 |