Q1065
Which statement exits a labeled flow-control construct?
A.
DESCRIBE
B.
LEAVE
AnswerC.
LOOP
D.
RETURN
Answer: Option B
Solution
Answer: Option B
Solution:
This question is about how to exit loops or other control structures in MySQL.
Let's break down the options:
Option A: DESCRIBE - This command is used to show the structure of a table. It doesn't control the flow of your code.
Option B: LEAVE - This is the correct answer! LEAVE is used to exit a labeled loop or other control structure like a WHILE loop or REPEAT loop.
Option C: LOOP - LOOP is used to start a looping construct in MySQL, it doesn't stop one.
Option D: RETURN - RETURN is used to exit a stored procedure or function, not a general loop or flow control structure.
In short: LEAVE is the keyword you use to jump out of a loop or other control structure in MySQL.