Which Transact-SQL statement or statements should you use?

Correct Answer for the Question – Which Transact-SQL statement or statements should you use? is given below

You develop a Microsoft SQL Server 2012 database.You need to create and call a stored procedure that meets the following requirements:Accepts a single input parameter for CustomerID.Returns a single integer to the calling application.Which Transact-SQL statement or statements should you use? (Each correct answer presents part of the solution. Choose all that apply.)@CustomerID INT,@CustomerRating INT OUTPUTASSET NOCOUNT ONSELECT @CustomerRating = CustomerOrders/CustomerValueFROM CustomersWHERE CustomerID = @CustomerIDRETURNGODECLARE @Result INTEXECUTE @Result = dbo.GetCustomerRating1745,@[email protected] INT,@CustomerRating INT OUTPUTASSET NOCOUNT ONSELECT @Result = CustomerOrders/CustomerValueFROM CustomersWHERE CustomerID = @CustomerIDRETURN @ResultGOEXECUTE [email protected] = 1745,@CustomerRating = @CustomerRatingByCustomer [email protected] INTASDECLARE @Result INTSET NOCOUNT ONSELECT @Result = CustomerOrders/CustomerValueFROM CustomersWHERE CustomerID = @CustomerIDRETURNS @ResultGO

CREATE PROCEDURE dbo.GetCustomerRating

EXECUTE dbo.GetCustomerRating 1745

DECLARE @CustomerRatingByCustomer INT

CREATE PROCEDURE dbo.GetCustomerRating

DECLARE @CustomerRatingByCustomer INT

CREATE PROCEDURE dbo.GetCustomerRating

Correct Answer

The Correct Answer for this Question is

CREATE PROCEDURE dbo.GetCustomerRating
DECLARE @CustomerRatingByCustomer INT

The answers for the certifications of MNCs could be very tricky to understand. that’s why we have solved and pasted these exam answers here. The Question – Which Transact-SQL statement or statements should you use? has been answered correctly and answers for various other similar questions could be found in the search box of this site.

More about these Exams

These Exam Questions and the order of these questions keep changing. but the answers are obviously same. so if you don’t find a question after another we suggest you search it in the search box and we are sure you’ll find it. you can bookmark this site for Quick access in future.

We hope you found it helpful don’t forget to leave a comment if you feel a need to correct or ask we’re always here to help.

you can find more here at mnccertified

Feel free to contact via comment or email.

Happy Learning

Cheers, Team MNCcertified

Leave a Comment