Which one of the following sorts rows in SQL?
A. SORT BY
B. ALIGN BY
C. ORDER BY
D. GROUP BY
Answer: Option C
Solution (By Examveda Team)
Option A: SORT BY - This is not a standard SQL keyword for sorting rows. The correct keyword for sorting rows in SQL is "ORDER BY".Option B: ALIGN BY - This is not a valid SQL keyword for any operation, including sorting.
Option C: ORDER BY - This is the correct answer. The "ORDER BY" clause in SQL is used to sort the result set by one or more columns in ascending or descending order.
Option D: GROUP BY - The "GROUP BY" clause is used to group rows that have the same values into summary rows, typically for aggregate functions like SUM or COUNT, not for sorting.
Conclusion:
The SQL keyword that sorts rows in a query result set is Option C: ORDER BY. This clause allows you to specify the column(s) by which you want to sort the results and the order (ascending or descending). Therefore, the correct answer is ORDER BY.
Related Questions on Introduction to SQL
You can add a row using SQL in a database with which of the following?
A. ADD
B. CREATE
C. INSERT
D. MAKE
The command to remove rows from a table 'CUSTOMER' is:
A. REMOVE FROM CUSTOMER ...
B. DROP FROM CUSTOMER ...
C. DELETE FROM CUSTOMER WHERE ...
D. UPDATE FROM CUSTOMER ...
A. limits the column data that are returned.
B. limits the row data are returned.
C. Both A and B are correct.
D. Neither A nor B are correct.
Which of the following is the original purpose of SQL?
A. To specify the syntax and semantics of SQL data definition language
B. To specify the syntax and semantics of SQL manipulation language
C. To define the data structures
D. All of the above

Join The Discussion