CREATE TABLE myTableName
(
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
)
(
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
)
No comments:
Post a Comment
Hello all, if you have any doubt feel free comment