what was the syntax to auto generate coulmn code which was contains string vakues

  Kiến thức lập trình

CREATE TABLE test_zz (
id INT IDENTITY(1,1) PRIMARY KEY,
customid AS ‘ABC’ + RIGHT(’01’ + CAST(id AS VARCHAR(150)), 2),
test_column VARCHAR(100)
);

insert into test_zz values
(‘Sample 2’)

select * from test_zz;

i want generate code automatically when i want fetch the data

New contributor

mahesh kopparthi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

LEAVE A COMMENT