Bird
0
0

Which clause specifies the return type of a function in PostgreSQL?

easy📝 Conceptual Q2 of 15
PostgreSQL - PL/pgSQL Fundamentals
Which clause specifies the return type of a function in PostgreSQL?
AOUTPUT
BRETURNS
CGIVES
DYIELDS
Step-by-Step Solution
Solution:
  1. Step 1: Identify the clause for function return type

    In PostgreSQL, the RETURNS clause defines the data type the function will return.
  2. Step 2: Validate other options

    Options B, C, and D are not valid PostgreSQL syntax for specifying return types.
  3. Final Answer:

    RETURNS -> Option B
  4. Quick Check:

    Return type clause = RETURNS [OK]
Quick Trick: Use RETURNS to define function output type [OK]
Common Mistakes:
  • Using OUTPUT instead of RETURNS
  • Omitting the RETURNS clause

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PostgreSQL Quizzes