For anyone confused A isn't gonna work because you didn't use aliases so its not comparing the right things.
Here is the correct query
create table invoices(
invoice_id number,
currency_code varchar2(10),
raised_date date
);
insert into invoices values(1, 'EUR', to_date('01-jan-2019'));
insert into invoices values(2, 'USD', to_date('01-feb-2019'));
insert into invoices values(3, 'JPY', to_date('01-mar-2019'));
create table currencies(
currency_code varchar2(10)
);
insert into currencies values('JPY');
insert into currencies values('GPD');
insert into currencies values('CAD');
insert into currencies values('EUR');
insert into currencies values('USD');
select *
from invoices;
select *
from currencies;
select *
from currencies c
where not exists (
select null from invoices i where i.currency_code = c.currency_code
);
D uses INTERSECT.
The Oracle INTERSECT operator compares the result of two queries and returns the distinct rows that are output by BOTH queries.
The question was to find the currecies only in ONE of the two tables. So C (MINUS)
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
TheOracleWasTaken
Highly Voted 6 months agobabyjaan
Most Recent 8 months, 1 week agoRik92
8 months agoRik92
1 year agoMahdiHamdii
1 year, 1 month ago