Bird
0
0

Which of the following is true about SQL functions compared to procedures?

easy📝 Conceptual Q11 of 15
SQL - Stored Procedures and Functions
Which of the following is true about SQL functions compared to procedures?
AFunctions return a value and can be used in SELECT queries.
BFunctions perform actions but do not return any value.
CProcedures always return a value and can be used in WHERE clauses.
DProcedures can be used inside SELECT statements like functions.
Step-by-Step Solution
Solution:
  1. Step 1: Understand the purpose of functions

    Functions are designed to return a value and can be called within queries like SELECT.
  2. Step 2: Compare with procedures

    Procedures perform tasks but do not return values directly and cannot be used inside SELECT statements.
  3. Final Answer:

    Functions return a value and can be used in SELECT queries. -> Option A
  4. Quick Check:

    Functions return values [OK]
Quick Trick: Functions return values; procedures perform tasks [OK]
Common Mistakes:
  • Thinking procedures return values like functions
  • Using procedures inside SELECT queries
  • Confusing function usage with procedure usage

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes