Author: Taiba Hamid

0

SQL HAVING Clause

The HAVING clause allows us to specify conditions on the rows for each group in combination with the GROUP BY clause (see the GROUP BY clause), the HAVING clause is evaluated after rows are...

0

SQL GROUP BY Clause

The GROUP BY clause is used to summarize data based on grouping criteria. For each group one column is returned in result set. Syntax SELECT expression1, expression2, … expressionN, aggregate_function (aggregate_expression) FROM TableName WHERE conditions GROUP...

0

SQL ORDER BY Clause

ORDER BY clause is used to sort the data in ascending or descending order, in SQL Server by default data will not be inserted in any order even if you have an index. Syntax:...

0

SELECT DISTINCT Statement

DISTINCT clause is used to remove the duplicate records from result set, The DISTINCT clause is used only with SELECT statement. Syntax SELECT DISTINCT [ColumnNames] FROM TableName We will start with an example, we...

0

SQL WHERE Clause

The WHERE clause is used to restrict the number of rows returned by SELECT statement, in this case SELECT statement return the rows only if the condition specified in the WHERE clause is satisfied. Syntax:...

0

SQL Aliases

Sometimes you want to change the column names to make them more readable, SQL aliases are used to change the names of tables or columns headings, it is used as follows: Syntax SELECT column_name AS...