Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Online Practice Test
>
Oracle PLSQL
« Previous
The ORDER BY clause can only be used in
Options
- SELECT queries
- INSERT queries
- GROUP BY queries
- HAVING queries
CORRECT ANSWER : SELECT queries
Discussion Board
Plsql
Good
Rakesh kp 06-27-2023 07:58 PM
ORDER BY clause
The Oracle ORDER BY clause is used to sort the records in your result set. The ORDER BY clause can only be used in SELECT statements.
Syntax:
SELECT expressions
FROM tables
[WHERE conditions]
ORDER BY expression [ ASC | DESC ];
where,
expressions: The columns or calculations that you wish to retrieve.
tables: The tables that you wish to retrieve records from. There must be at least one table listed in the FROM clause.
WHERE condition is optional. The conditions that must be met for the records to be selected.
ASC condition is optional. It sorts the result set in ascending order by expression (default, if no modifier is provider).
DESC condition is optional. It sorts the result set in descending order by expression.
Prajakta Pandit 02-15-2017 05:45 AM
All of the above!
I just ran an INSERT query that successfully inserted the result set of a SELECT statement containing a GROUP BY, HAVING, and an ORDER BY clause. So, as with many of the questions in this test, I am confused about what this question is really asking or what the answer means.
It appears the correct answer would have been: All of the above
INSERT into temp
SELECT count(*), job_id
FROM hr.employees
GROUP BY job_id
HAVING count(*) > 2
ORDER BY job_id;
Doug 01-13-2017 11:45 AM
oraclesql
good questions
divya 06-14-2016 07:30 AM
« Previous
Write your comments
*
*
Email must be in the form someone@domain.com
*
*
Enter the code shown above:
Please enter the code shown above
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)
Related Content
Oracle (40)
Oracle (30)
Oracle (49)
Oracle (51)
Oracle (52)
Oracle DBA (29)
Oracle PLSQL (30)
Oracle Replication (20)
Oracle Architecture (20)
Oracle Transaction (20)
PLSQL (22)
PLSQL (24)
PLSQL (50)
Advertisement
▲