选择SQL Server CE4更新

时间:2011-11-04 20:27:18

标签: tsql sql-server-ce sql-update sql

我有以下针对SQL Server 2008的SQL:

declare @id bigint;

update [dbo].[Identities] 
set @id = CurrentId + 1, CurrentId = CurrentId + @numOfIds 
where [EntityHash] = @entityHash;

select @id as StructureId;

我需要与SQLCE4相同的语义。试图将@id作为输出参数,然后使用:

update [Identities] 
set @id = CurrentId + 1, CurrentId = CurrentId + @numOfIds 
where [EntityHash] = @entityHash;

但事实证明,SQL Server CE 4不支持输出参数。

0 个答案:

没有答案