Concept Of SQL Server Part III
Union is used to combine data of one or more tables.
Union only distinct values are allowed.
The following SQL statement returns the Id, FirstName, LastName (only distinct values) from both the "tblCustomer" and the "tblCustomerExpired" table :
Group by clause is used to combines the groups rows that have the same values into rows.
The Group By clause is used with aggregate functions (COUNT(), MAX(), MIN(), SUM(), AVG()) to group the result-set by one or more columns.
Subquery is nothing but query inside a query.
Inner query is called as subquery and embedded within the Where clause.
In keyword is used to retrieve rows in subquery based on the match of values given in a list.
Correlated Subquery is a subquery that uses values from the outer query.
Correlated subqueries are used for row-by-row processing. Each subquery is executed once for every row of the outer query.
A correlated subquery is evaluated once for each row processed by the parent statement. The parent statement can be a select statement.
Inner join is used to combine rows from two or more tables.
Inner joins can be used to return rows.
Subquery is used to combine data from different tables into a single result.
Subqueries can be used to return either a single value or a row set.
Comments
Post a Comment