8
Answers

How To get Last Inserted Records Guid Uniqueidentifier

Gagan Gautam

Gagan Gautam

8y
280
1
this is my query..
 
INSERT INTO Model (Id,Name,ValidationDate,NextValidationDate,DateCreated,DateUpdated,BusinessGroup,Country,UserId,StatusId,Deleted,RejectionNote)
SELECT Id,Name+'Copy',ValidationDate,NextValidationDate,DateCreated,DateUpdated,BusinessGroup,Country,UserId,StatusId,Deleted,RejectionNote FROM Model
where Id=@modelId
 
 {Id will be Print  on this section}
 
after inserting the record in this table i want to get Id (first Coloumn).

Answers (8)