sql创建表变量,转百分数
declare @tab table(
ID nt identity(1,1) primary key, --从1开始,每次自增1
,Name nvarchar(200)
)
declare a float
select @NodesPercentage=Cast((cast(round((case when a>1 then 1 else a end),2) as numeric(10,2)))*100 as varchar(20))+'%'
declare @tab table(
ID nt identity(1,1) primary key, --从1开始,每次自增1
,Name nvarchar(200)
)
declare a float
select @NodesPercentage=Cast((cast(round((case when a>1 then 1 else a end),2) as numeric(10,2)))*100 as varchar(20))+'%'