comparing the result of multiple SELECT statements [message #610769] |
Mon, 24 March 2014 03:53 |
|
nischalinn
Messages: 118 Registered: May 2012 Location: nepal
|
Senior Member |
|
|
how to compare the results of two SELECT query, if all of them gives the same result the output
should be NULL.
CREATE TABLE TEST1
(
check_point varchar2(10)
);
insert into TEST1 values ('100mm');
insert into TEST1 values ('500mm');
insert into TEST1 values ('250mm');
CREATE TABLE TEST11
(
base_check_point varchar2(10)
);
insert into TEST11 values ('100mm');
insert into TEST11 values ('500mm');
insert into TEST11 values ('250mm');
how to check if these two statements:
select distinct check_point from test1
and
select distinct base_check_point from test11
give the same result or not?
One way is to use MINUS query, but I've to use MINUS two times for comparing the result from both the tables.
How can I do this?
|
|
|
|
|
|
|
|