SQL stored procedure

xiaoxiao2021-03-06  42

Create a table with identity columns: CREATE TABLE AA (AU_ID INT IDENTITY, AU_NAME VARCHAR (50)) Create a stored procedure inserted into the AA table and returns a new ID value: Create Proc Addaa (@Auname Varchar (50), @ID INT OUTPUT) AS INSERT AA (@Auname) Select @ID = @@ identityGo Perform a stored procedure with output parameters: declare @clare intexec addaa 'ee', @ Clare Outputprint @clare

转载请注明原文地址:https://www.9cbs.com/read-112280.html

New Post(0)