Question: Which of the following is a valid SQL FOR loop? Question 6 options: / * Pretend that total _ sal has been defined * /

Which of the following is a valid SQL FOR loop?
Question 6 options:
/* Pretend that total_sal has been defined */
FOR row = SELECT salary FROM instructor
WHERE dept_name = 'Comp. Sci.'
BEGIN
SET total_sal = total_sal + row.budget
END
/* Pretend that total_sal has been defined */
FOR row IN
SELECT salary FROM instructor
WHERE dept_name = 'Comp. Sci.'
BEGIN
SET total_sal = total_sal + row.budget
END
/* Pretend that total_sal has been defined */
FOR
SELECT salary INTO row
FROM instructor
WHERE dept_name = 'Comp. Sci.'
DO
SET total_sal = total_sal + row.budget
END FOR
/* Pretend that total_sal has been defined */
FOR row AS
SELECT salary FROM instructor
WHERE dept_name = 'Comp. Sci.'
DO
SET total_sal = total_sal + row.budget
END FOR
/* Pretend that total_sal has been defined */
FOR (INT row; row != END; row ++)
SELECT salary FROM instructor
WHERE dept_name = 'Comp. Sci.'
{
SET total_sal = total_sal + row.budget
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!