1
Answer

Primary Key Custom Format

Andy Roque

Andy Roque

8y
413
1
Good Day to all,
 
Please help me with my project, I would like to create a Custom Primary Key in my database design,
the format is [current year][current month][3 digit counter].
This goes something like this ==> 201602001. Next id should be 201602002 and so on, but here is the catch, the following month it should display ==> 201603001 then next id should be 201603002 and so on. The three digit counter should reset to 001 every month. 
 
Is this possible? 
 
Thank you in advance.... 
Answers (1)