Sql query MINUS operator

by Mohan 2014-05-31 15:34:19

Sql query MINUS operator

Sql query :
Table 1
S.No Supplierid date
1 11 07/01/2014
2 12 05/02/2014
3 13 15/02/2014

Table 2
S.No Supplierid date
1 11 07/01/2014
2 12 15/02/2014


Sql query: SELECT date FROM table1 MINUS SELECT date FROM table2;

will give result
 
date
05/02/2014

The dates 15/02/2014,07/01/2014 are present in table1 and table2 database tables.The minus operator in  the above sql results in distinct values of date from table1 and table 2..

Tagged in:

770
like
0
dislike
0
mail
flag

You must LOGIN to add comments