Set column autogenerate numbers
i have a table with column student_id as primary key, also i have another column which is student admission number i want after every registration adm_no to move to next number without skipping , how can i do it
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Sibeesh VenuRank #27 · 42.9K reputationPosted May 25, 2015, 3:27 AM EDT
(
GRNo INT IDENTITY(1,1) NOT NULL,
SecondColumnName VARCHAR(100),
OtherColumnsName VARCHAR(100),
BillNo AS ( 'B' + CAST( GRNo AS varchar(max) ) ) -- filling the value by computing B1 if GRNo is 1
-- OR Simply
-- BillNo AS (GRNo ) -- filling with GRNo
)