is it necessary to write group by and order by clause together

Answers were Sorted based on User's Feedback



is it necessary to write group by and order by clause together..

Answer / guest

No it is not necessary.

Is This Answer Correct ?    36 Yes 2 No

is it necessary to write group by and order by clause together..

Answer / suman

No Required.

Group by is grouping the records

but Order by mention the data should be desc or asc order.

Is This Answer Correct ?    0 Yes 0 No

is it necessary to write group by and order by clause together..

Answer / madhav

yes,
select deptno,sum(sal) from emp group by deptno;
(it displays ascending order)
when we want to display the descending order,we need order
by clause and group clause.
select deptno,sum(sal) from emp group by deptno order by
deptno desc
(it displays the descending order)

Is This Answer Correct ?    9 Yes 10 No

Post New Answer

More SQL PLSQL Interview Questions

What are the basic techniques of indexing?

0 Answers  


What is keys and its types?

0 Answers  


What is the difference between distinct and unique in sql?

0 Answers  


Explain autonomous transaction.

0 Answers  


what is 'mysqld'? : Sql dba

0 Answers  






How does join work in sql?

0 Answers  


What does plv msg allows you to do?

0 Answers  


Why triggers are used?

0 Answers  


What do you know by pl/sql cursors?

0 Answers  


select * from emp where sal in(select max(sal) from emp) here there is any limit for in operator how many values accpect ?

2 Answers  


What is a record in a database?

0 Answers  


what is sql in mysql? : Sql dba

0 Answers  


Categories