Bird
0
0

Which of the following is the correct syntax to start a LOOP block in PostgreSQL?

easy📝 Syntax Q3 of 15
PostgreSQL - PL/pgSQL Fundamentals
Which of the following is the correct syntax to start a LOOP block in PostgreSQL?
AFOR ... END FOR;
BWHILE ... END WHILE;
CLOOP ... END LOOP;
DBEGIN ... END;
Step-by-Step Solution
Solution:
  1. Step 1: Recall PostgreSQL LOOP syntax

    A LOOP block starts with LOOP and ends with END LOOP;.
  2. Step 2: Compare options with correct syntax

    Only LOOP ... END LOOP; matches the exact syntax for a LOOP block in PostgreSQL.
  3. Final Answer:

    LOOP ... END LOOP; -> Option C
  4. Quick Check:

    LOOP syntax = LOOP ... END LOOP; [OK]
Quick Trick: LOOP blocks end with END LOOP; [OK]
Common Mistakes:
  • Using END FOR; instead of END LOOP;
  • Confusing WHILE syntax with LOOP
  • Using BEGIN ... END; for loops

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PostgreSQL Quizzes