how to create auto increment column with characters and number like alphanumeric in sql server? -


i have table primary key column auto-increment id of numerals starting 1000..

now have been asked make unique key each records starts c20161, c20162, c20163 , on series goes on.....

so alphanumeric key auto-increments....

i know how implement same in sql , can update same existing records?

is 'sequence' looking or else?

you need computed column purpose,

create table tablename(      id int identity(1,1) not null,      newcolumnname 'c' + cast(id varchar(30)),      .... other columns list here ) 

Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -