DRAG DROP
You use SQL Server 2014.
You need to create a single object that inserts a provided value into Table1, and then returns
a count of the records in Table1.
Develop the solution by selecting and arranging the required code blocks in the correct
order. You may not need all of the code blocks.
Answer: See the explanation.
Explanation:
CREATE PROCEDURE dbo.Spr_Table1 @InsertWord Varchar (10), @Var1 INT Output AS BEGIN
INSERT INTO TABLE1(FIELD1) VALUES (@InsertWord)
SELECT @Var1 = count(*) FROM TABLE1
END
–CREATE PROCEDURE
http://technet.microsoft.com/en-us/library/ms187926.aspx
http://technet.microsoft.com/en-us/library/ms345415.aspx
[email protected]
CREATE PROCEDURE dbo.Spr_Table1 @InsertWord Varchar
(10), @Var1 int OUTPUT AS BEGIN
INSERT INTO TABLE1(FIELD1) values (@InsertWord)
Select @Var1 = count(*) From Table1
RETURN @Var1
END