What is the default sorting order when using the ORDER BY clause in an SQL statement? MCQ with Answer and Explanation

What is the default sorting order when using the ORDER BY clause in an SQL statement?
A. Descending
B. Random
C. Ascending
D. Alphabetic only
Answer: Option C
Solution (By JKSSB Mock Tests)
By default, the ORDER BY clause sorts the query results in ascending order unless specified otherwise using the DESC keyword.

Discuss this Question (0)

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

Practice More Database Management System (DBMS) Questions

Question #1
Which clause is used in SQL queries to filter rows and retrieve only those records that satisfy a specific condition?
A. WHERE
B. GROUP BY
C. ORDER BY
D. HAVING

Correct Answer: Option A


Explanation:
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)
Question #2
What is a self join?
A. Joining a table with itself
B. Joining tables without a common column
C. Joining more than two tables
D. Joining two different tables

Correct Answer: Option A


Explanation:
A self join is a join where a table is joined with itself, often used to compare rows within the same table.

This question belongs to: Computer Database Management System (DBMS)
Question #3
Which of the following is a valid constraint in SQL?
A. PRIMARY KEY
B. All of the above
C. CHECK
D. FOREIGN KEY

Correct Answer: Option B


Explanation:
CHECK, PRIMARY KEY, FOREIGN KEY, UNIQUE, NOT NULL are all constraints in SQL.

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