I need to return newly created GUID from Stored procedure for each time i make a call.
How can i achieve this?
I need to return newly created GUID from Stored procedure for each time i make a call.
How can i achieve this?
CREATE PROCEDURE YourSproc
@guid UNIQUEIDENTIFIER OUTPUT
AS
SET @guid = NEWID()
And an example of calling it...
DECLARE @temp UNIQUEIDENTIFIER
EXEC YourSproc @temp OUTPUT
SELECT @temp