What is the difference between GROUP BY and ORDER BY in
Sql?
Answer Posted / zaid manzoor
The ORDER BY keyword is used to sort the result-set.
The ORDER BY Keyword
The ORDER BY keyword is used to sort the result-set by a specified column.
The ORDER BY keyword sort the records in ascending order by default.
If you want to sort the records in a descending order, you can use the DESC keyword.
SQL ORDER BY Syntax
Aggregate functions often need an added GROUP BY statement.
The GROUP BY Statement
The GROUP BY statement is used in conjunction with the aggregate functions to group the result-set by one or more columns.
| Is This Answer Correct ? | 19 Yes | 5 No |
Post New Answer View All Answers
What is insert query in mysql?
Explain the storage engines in mysql?
How do I kill a mysql connection?
What is flush privileges in mysql?
what are the different tables present in mysql? : Mysql dba
How to Join tables on common columns.
What is clob datatype?
How to create trigger in mysql phpmyadmin?
How to extract a unit value from a date and time?
How to write after insert event update trigger on the same table in mysql?
What is mysql in dbms?
What is the use of innodb in mysql?
what is the difference between between and in operators in mysql?
Which is better mysql or mssql?
What does a TIMESTAMP do on UPDATE CURRENT_TIMESTAMP data type?