Stored Procedure Output Parameter
Posted on 2004-08-16
I have a stored procedure that I would like to modify to return the guid generated by the sql server.... Actually I am not sure if I want to use an output parameter or return the guid. As long as it works, I can go either way. My table is set up so that there are 3 fields, the last of which is set to generate a row guid.
Here is my current Stored Procedure:
CREATE PROCEDURE dbo.NewInsertCommand_table1
SET NOCOUNT OFF;
INSERT INTO Table1(one, two, theID) VALUES (@one, @two, @theID);
SELECT one, two, theID FROM Table1 WHERE (theID = @theID)
This sp was generated by Visual Studio .net 2003.