exam questions

Exam 1z0-071 All Questions

View all questions & answers for the 1z0-071 exam

Exam 1z0-071 topic 1 question 24 discussion

Actual exam question from Oracle's 1z0-071
Question #: 24
Topic #: 1
[All 1z0-071 Questions]

Examine the data in the INVOICES table:

Examine the data in the CURRENCIES table:

Which query returns the currencies in CURRENCIES that are not present in INVOICES?
A.

B.

C.

D.

Show Suggested Answer Hide Answer
Suggested Answer: C

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
TheOracleWasTaken
Highly Voted 6 months ago
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 );
upvoted 6 times
...
babyjaan
Most Recent 8 months, 1 week ago
D IS CORRECT OPTION...AS THE NUMBER OF COLUMN ARE NOT SAME IN BOTH TABLES..PRACTICALLY IMPLEMENTED..CORRECT OPTION D
upvoted 1 times
Rik92
8 months ago
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)
upvoted 2 times
...
...
Rik92
1 year ago
for minus operator one needs to specify the colums. Intersect gives you the matching data. So C
upvoted 2 times
...
MahdiHamdii
1 year, 1 month ago
C is correct.
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
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.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago