c# - ASP.NET How to Generate a Student Number with Formula (e.g. RS 1001000) -


i need generate student number formula below asp.net.

so every time student added database should automatically generate student id.

note( when adding new student database need know last student id has been added database can follow correct formula).

rs 1011000   rs 1011001   rs 1011002   rs 1011003   rs 1011004  

create id column bigint identity(10000000, 1) , calculated column prefixes 'rs' column.

so like

create table example (studentid bigint not null identity(10000000, 1), rsnumber 'rs' + cast(studentid varchar(15)))

http://www.kodyaz.com/articles/sql-server-computed-column-calculated-column-sample.aspx


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -