retagged by
495 views

1 Answer

Best answer
8 votes
8 votes

Answer : Union All , Select  

The UNION operator selects only distinct values by default. To allow duplicate values, use the ALL keyword with UNION.

INTERSECT command will only return distinct values.

Similar to the UNION command, INTERSECT also operates on two SQL statements. The difference is that, while UNION essentially acts as an OR operator (value is selected if it appears in either the first or the second statement), the INTERSECT command acts as an AND operator (value is selected only if it appears in both statements).

Reference : http://www.tutorialspoint.com/sql/sql-intersect-clause.htm

selected by

Related questions

1 votes
1 votes
1 answer
2
Na462 asked Jan 19, 2019
1,209 views
1 votes
1 votes
1 answer
3
Shubhanshu asked Dec 24, 2018
1,307 views
According to me it should be – “Retrieve the names of all students with a lower rank, than all students with age < 18 ”
0 votes
0 votes
0 answers
4
Shivani gaikawad asked Nov 3, 2018
560 views