1. Home
  2. Data Science
  3. SQL for Data Analysis
  4. A CASE expression in SQL is used to:

Added 30 Nov -0001

A CASE expression in SQL is used to:

  1. sort rows by a chosen column
  2. return different values based on conditions Correct answer
  3. create a new table inside the database schema
  4. join two tables on a common column

Correct answer

B. return different values based on conditions

11 views

MCQSEXAM

Explanation

CASE implements if-then-else logic inside a query, often for conditional labels or buckets.

Reference

Asked in: NTS, PPSC IT, Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More SQL for Data Analysis MCQs

Practise all SQL for Data Analysis MCQs

Similar MCQs