We are providing online training of realtime Live project on Asp.Net MVC with Angular and Web API. For more information click here. If you have any query then drop the messase in CONTACT FORM

Monday, April 30, 2018

How To Auto Increment Alphanumeric Primary Key In sql server


CREATE TABLE dbo.Dept(ID INT IDENTITY PRIMARY KEY,


                      DeptId AS 'D'  + RIGHT('00000' + CAST(ID AS VARCHAR(10)),4),
DepatName varchar(50)
                     )

Output:



No comments: