我需要一个可以在插入后返回主键列表(自动生成)的过程
PROCEDURE [dbo].[Person_InsertCloud]
@TablePerson Catalog.Type_Person READONLY
AS
SET NOCOUNT ON
INSERT INTO dbo.PersonaTestCLOUD
(IdPerson, IdDocument,NroDocument,Name,LastName, SecondLastName,BrandName,
Birthdate, IdSex, IdState, IdTypePerson, IdUbicationGeographic, NumberPhoneDefault,
IdDirectory,IdPhoto)
SELECT t.Id,t.IdDocument,t.NroDocument,t.Name,t.LastName,t.SecondLastName,t.BrandName,
t.BirthDate,t.IdSex,t.IdState, t.IdTypePerson,t.IdUbicationGeographic,t.NumberPhoneDefault,
t.IdDirectory, t.IdPhoto
FROM @TablePerson t
WHERE t.IdServer = -1;
那可能吗?我在一个只返回一个 id 的过程之前使用过。
谢谢