is it necessary to write group by and order by clause together
Answers were Sorted based on User's Feedback
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 |
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 |
what is foreign key? : Sql dba
Can a composite key be null?
Explain the uses of control file.
What is query syntax?
is it mandatory to select all the column in a view then what columns should be selected
How to use transactions efficiently : transact sql
What is form and report?
What are the methods of filing?
Suppose I have to create a view on a table, that is not yet been created by DBA. I khow the table structure. Is it possible to create the view before DBA creates this table? If yes then how? Is it possible to create synonym in this way?
What is the difference between the implicit and explicit cursors?
Can a key be both primary and foreign?
Is primary key a clustered index?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)