日期:2014-05-18 浏览次数:20676 次
decare @t table (guid guid) INSERT INTO T_PGM_ViewRole(ID) output into @t(guid) SELECT NEWID() --从表@t里获取
------解决方案--------------------
decare @t table (guid guid) INSERT INTO T_PGM_ViewRole(ID) output inserted.ID into @t SELECT NEWID() --从表@t里获取
------解决方案--------------------
没闹啊。。
------解决方案--------------------
create proc pr_name(@id nvarchar(30) out)
as
begin
set @id=NEWID()
INSERT INTO T_PGM_ViewRole(ID) SELECT @id
end
declare @id nvarchar(30)
exec pr_name @id output
print @id
------解决方案--------------------