SQL Basics - DISTINCT || TOP N|| GROUP BY || ORDER BY || HAVING || WHERE
Description
SQL DISTINCT keyword is used in conjunction with the SELECT statement to eliminate all the duplicate records and fetching only unique records.
SQL TOP Limits the rows returned in a query result set to a specified number of rows or percentage of rows in SQL Server.
The SQL GROUP BY clause is used in collaboration with the SELECT statement to arrange identical data into groups
The ORDER BY statement in sql is used to sort the fetched data in either ascending or descending according to one or more columns.
A HAVING clause in SQL specifies that an SQL SELECT statement must only return rows where aggregate values meet the specified conditions.
Comments