我有以下针对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不支持输出参数。