📜  sql代码示例中带前缀的列

📅  最后修改于: 2022-03-11 15:05:34.904000             🧑  作者: Mango

代码示例1
create table  #test
(
Id int identity(1,1),
Pid as 'PRE-'+REPLACE(STR(id, 7), SPACE(1), '0')
)
 
INSERT INTO #test DEFAULT VALUES
INSERT INTO #test DEFAULT VALUES
select *From #test