How to add a 16 digit auto incremental field in sql? I would like to create an application in vc 2010 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)+ 16 digit.. For instance, if the user gives the pincode as 641001 then, it should be added as 6410010000000001, and if another user with same pin code enters the details, then it should be added as 6410010000000002. And if another user with different pincode 552145 then it should be added as 5521450000000001.. 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.