What is the purpose of the SQL COALESCE function? MCQ with Answer and Explanation

What is the purpose of the SQL COALESCE function?
A. Returns the first non-NULL value from a list
B. Computes the sum
C. Concatenates strings
D. Converts data types
Answer: Option A
Solution (By JKExamLibrary)
COALESCE returns the first non-NULL value among its arguments, often used to provide a default value.

Discuss this Question (0)

No comments yet. Be the first to start the discussion!

Practice More Database Management System (DBMS) Questions

Question #1
Which constraint ensures that every value in a specific column is unique across all rows in that table, but still permits a NULL value?
A. UNIQUE
B. PRIMARY KEY
C. FOREIGN KEY
D. CHECK

Correct Answer: Option A


Explanation:
The UNIQUE constraint prevents duplicate entries in a column. Unlike a Primary Key, a UNIQUE constraint typically allows one or more rows to store NULL values depending on the database engine.

This question belongs to: Computer Database Management System (DBMS)
Question #2
What is 'data about data' commonly referred to in a Database Management System?
A. Directory
B. Sub-data
C. Metadata
D. Hyper-data

Correct Answer: Option C


Explanation:
Metadata is defined as data about data. It describes the structure, constraints, data types, and properties of the actual data stored in a database.

This question belongs to: Computer Database Management System (DBMS)
Question #3
What is a data mart?
A. A type of database
B. A backup technique
C. A query language
D. A subset of a data warehouse focused on a specific business unit or function

Correct Answer: Option D


Explanation:
A data mart is a specialized data warehouse for a specific department, team, or subject area.

This question belongs to: Computer Database Management System (DBMS)