Hi,
I want to do a count(*) table 1 minus count(*) table 2 in a test case. How does minus work in functions?
create table count1( col1 number);
create table count2( col2 number);
truncate table count1;
truncate table count2;
insert into count1 values(1);
insert into count1 values(2);
insert into count1 values(3);
insert into count1 values(4);
insert into count1 values(5);
commit;
insert into count2 values(1);
insert into count2 values(2);
insert into count2 values(3);
insert into count2 values(5);
commit;
SQL> select * from count1
2 minus
3 select * from count2;
COL1
----------
4
SQL>
SQL> select count(*) from count1
2 minus
3 select count(*) from count2;
COUNT(*)
----------
5
SQL>