Which clause is used in SQL queries to filter rows and retrieve only those records that satisfy a specific condition? MCQ with Answer and Explanation

Which clause is used in SQL queries to filter rows and retrieve only those records that satisfy a specific condition?
A. GROUP BY
B. WHERE
C. ORDER BY
D. HAVING
Answer: Option B
Solution (By JKExamLibrary)
The WHERE clause is used to filter records based on a specified condition before any grouping takes place.

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

Discuss this Question (0)

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

Practice More Database Management System (DBMS) Questions

Question #1 Report Error
Which of the following is not a type of database model?
A. Network
B. Object-oriented
C. Hierarchical
D. Flat-file

Correct Answer: Option D


Explanation:
Flat-file is not a database model; it is a simple file containing records. Hierarchical, Network, Relational, and Object-oriented are database models.

This question belongs to: Computer Database Management System (DBMS)
Question #2 Report Error
Which of the following is a valid way to join three tables in SQL?
A. SELECT * FROM table1, table2, table3 WHERE condition1 AND condition2;
B. Both A and B
C. SELECT * FROM table1 JOIN table2 ON condition1 JOIN table3 ON condition2;
D. Neither

Correct Answer: Option B


Explanation:
Both syntaxes are valid: explicit JOIN syntax and implicit comma join with WHERE conditions.

This question belongs to: Computer Database Management System (DBMS)
Question #3 Report Error
What is the difference between an inner join and an outer join?
A. Inner join returns only matching rows; outer join returns matching plus non-matching rows from one or both tables
B. Outer join is used for more than two tables
C. They are the same
D. Inner join returns all rows; outer join returns matching only

Correct Answer: Option A


Explanation:
Inner join returns rows where the join condition matches. Outer join (left, right, full) returns unmatched rows as well with NULLs.

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