How to add a 12 digit auto incremental field in sql? I would like to create an application in Qt which has 3 fields, name, date of birth and pincode. If user gives all the information including the pin code, it should be inserted in the database. But the unique id field will be updated automatically with the pincode (6 digit)+ 6 digit.. For instance, if the user gives the pincode as 641001 then, it should be added as 641001000001, and if another user with same pin code enters the details, then it should be added as 641001000002. And if another user with different pincode 552145 then it should be added as 552145000001.. and so on.. It should check for pincode if already exists, then add 1 to the last digit and update it. and it should be unique.
Bookmarks