Gagan Gautam

Gagan Gautam

  • NA
  • 140
  • 14.2k

How To get Last Inserted Records Guid Uniqueidentifier

Jul 7 2016 5:58 AM
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)