You need to create a single object that inserts a provided value into Table1, and then returns a count of the records in Table1

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.

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:

Box 1:

Box 2:

Box 3:

Box 4:



Leave a Reply 3

Your email address will not be published. Required fields are marked *


adityomagnet@gmail.com

[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
END

Kevin

Kevin

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