CREATEPROCEDURE AddProduct ( @ProductNamenvarchar(50), @CategoryIDint, @UnitPricemoney ) AS INSERTINTO Products (ProductName, CategoryID, UnitPrice) VALUES (@ProductName, @CategoryID, @UnitPrice) SELECT ProductID, ProductName, CategoryID, UnitPrice FROM Products WHERE ProductID =SCOPE_IDENTITY() GO CREATEPROCEDURE DeleteProduct ( @ProductIDint ) AS DELETE Products WHERE ProductID =@ProductID GO CREATEPROCEDURE UpdateProduct ( @ProductIDint, @ProductNamenvarchar(50), @LastUpdatedatetime ) AS UPDATE Products SET ProductName =@ProductName WHERE ProductID =@ProductIDAND LastUpdate =@LastUpdate IF@@ROWCOUNT>0 -- This statement is used to update the DataSet if changes are done on the updated record (identities, timestamps or triggers ) SELECT ProductID, ProductName, CategoryID, UnitPrice FROM Products WHERE ProductID =@ProductID GO