create table dbo.a(
printfmt AS ((convert(varchar(255),[autoval]))),
prec AS ((convert(smallint,case when ((type_name([xtype]) = 'ntext' or (type_name([xtype]) = 'image' or type_name([xtype]) = 'text'))) then null when (type_name([xtype]) = 'uniqueidentifier') then [xprec] else (odbcprec([xtype],[length],[xprec])) end))),
scale AS ((odbcscale([xtype],[xscale]))),
其中的 as (( convert 是什么意思!
printfmt AS ((convert(varchar(255),[autoval]))),
prec AS ((convert(smallint,case when ((type_name([xtype]) = 'ntext' or (type_name([xtype]) = 'image' or type_name([xtype]) = 'text'))) then null when (type_name([xtype]) = 'uniqueidentifier') then [xprec] else (odbcprec([xtype],[length],[xprec])) end))),
scale AS ((odbcscale([xtype],[xscale]))),
其中的 as (( convert 是什么意思!
to pbsql(风云) 是计算列的表达式,能解释一下是什么意思吗?
(
a as 1+2,
b as 'abc',
c int
)
insert into testtable
select 1select * from testtable
drop table testtable
/*a b c
----------- ---- -----------
3 abc 1
*/
其中的 as (( convert 是什么意思!
---------------------------------把字段autoval的内容转换成类型varchar(255)来表达,新的名称是 printfmt convert类型专号函数,cast也是类型转换函数。