) Sql statements are build by using clauses. The different clauses in the sql server.
1. Where Clause
2. Order by Clause
3. Group By Clause
4. Having Clause
Where Clause :- Where clause is used to extract particular records from the table based on a condition.
Ex: select <columnList> from <tableName> where <condition>
Order by Clause : Order by clause is used to sort data based on one or more column’s either in ascending order or descending order .
Ex: Select <columnlist> from <tableName> order by <columnList>
Group by Clause : Group by clause is used to group the records based on one or more columns to calculate aggregates like Max, Min, Sum etc.
Having Clause : Having clause is used to exact particular groups use having clause. And to filter data after group by use having clause.
No comments:
Post a Comment