I want to create a unique id for table Emp in MySQL like "Emp_0416_1", "Emp_0416_2" and "Emp_0516_1", "Emp_0516_2".
Here
Emp is stand for Employee,
04 is April month,
16 is year,
1 is emp code.
And
Emp is stand for Employee,
05 is May month,
16 is year,
1 is emp code.
Table is :
create table emp (
id varchar(20),
name varchar(20)
);
When I insert the emp name then it will auto increment like above unique id.