Home » Microsoft » 70-461 v.2 » How should you complete the stored procedure?
DRAG DROP
You develop a SQL Server database for a large multinational company.
You must develop a stored procedure to loop through employee information and return data for one employee at a time.
How should you complete the stored procedure? To answer, drag the appropriate Transact-SQL segment to the correct locations in the answer area. Each Transact-SQL segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
Select and Place:
Correct Answer:
Explanation/Reference:
Box 1: CURSOR VARYING OUTPUT
Transact-SQL stored procedures can use the cursor data type only forOUTPUT parameters. If the cursor data type is specified for a parameter, both the VARYING and
VARYING and OUTPUT parameters are required. If the VARYING keyword is specified for a parameter, the data type must be cursor and the OUTPUT keyword must be specified.
Box2: FORWARD.ONLY STATIC
Box 3: CLOSE
Box 4: DEALLOCATE
References:https://technet.microsoft.com/en-us/library/ms175498(v=sql.l05).aspx