What is the purpose of the SQL 'ORDER BY' clause? MCQ with Answer and Explanation

What is the purpose of the SQL 'ORDER BY' clause?
A. To sort the result set
B. To filter rows
C. To join tables
D. To group rows
Answer: Option A
Solution (By JKSSB Mock Tests)
ORDER BY sorts the query results in ascending or descending order based on specified columns.

Discuss this Question (0)

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

Practice More Database Management System (DBMS) Questions

Question #1
The intentional process of introducing redundant data into a normalized database structure to optimize read query performance is called what?
A. Normalization
B. Fragmentation
C. Denormalization
D. Decomposition

Correct Answer: Option C


Explanation:
Denormalization is a strategy applied to normalized databases where redundant data is selectively added to speed up complex read queries by minimizing costly table joins.

This question belongs to: Computer Database Management System (DBMS)
Question #2
What is an alternate key?
A. The primary key
B. A foreign key
C. A super key with extra attributes
D. A candidate key that is not chosen as the primary key

Correct Answer: Option D


Explanation:
An alternate key is any candidate key that is not the primary key.

This question belongs to: Computer Database Management System (DBMS)
Question #3
In SQL, which statement is used to create a new database?
A. CREATE TABLE
B. CREATE SCHEMA
C. NEW DATABASE
D. CREATE DATABASE

Correct Answer: Option D


Explanation:
CREATE DATABASE is used to create a new database in SQL.

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