Differentiate between Where and Orderby clause of SQL statements
Answers
Answered by
21
Answer:
In group by clause, the tuples are grouped based on the similarity between the attribute values of tuples. Whereas in order by clause, the result-set is sorted based on ascending or descending order
Explanation:
Answered by
18
The WHERE clause specifies the rows you want to look at. The Order by the statement, on the other hand, sorts the result set in ascending or descending order.
ORDER BY Clause :
- The Order by the statement, on the other hand, sorts the result set in ascending or descending order.
- It isn't used in the CREATE VIEW statement.
- It is always used after the group by keyword in a select statement.
- When using the order by statement method, the attribute can be placed under the aggregate function.
WHERE :
- The WHERE clause specifies the rows you want to look at.
- The WHERE clause in SQL Server is used to limit the rows returned by a query.
- To conduct the same join using the WHERE clause as you would with the INNER JOIN syntax.
- When collecting data from a single table or merging many tables, the SQL WHERE clause is used to set a condition.
Similar questions