|
declare @tt table (sid tinyint identity(1,1),v decimal(18,2),st tinyint)
insert into @tt
select #1.vs,
case
when ... then 0
when ... then 1
when ... then 2
end si
from fd()#1
inner join
fs('')#3
on #1.id=#3.id
order by vs,si
就会出错:
服务器: 消息 8101,级别 16,状态 1,行 3
仅当使用了列的列表,并且 IDENTITY_INSERT 为 ON 时,才能在表 '@tt' 中为标识列指定显式值。
如果去掉order by vs,si,就不会出错!
vs是decimal数据。 |
|