What is SET operator in SQL SERVER
| SET operators mainly used to combine same type of data from two or more tables.And another thing is that columns and their data type should be same as all the queries have.The column names from the first query will appear in the result.
UNION - It produce rows of Ist query + rows of 2nd query minus duplicate rows UNION ALL - It produce rows from both the queries including duplicate rows.MINUS - Rows that are unique for the 1st query will b |
|
| e retrieved
INTERSECT - common rows from both the queries will be retrieved.
Join is used to select columns from two or more tables. | |
