drop table orders;
create table orders(order_id number , order_date date);
insert into orders values(1,null);
insert into orders values(2,null);
insert into orders values(3,'1-jan-2019');
insert into orders values(4,'1-feb-2019');
insert into orders values(5,'1-mar-2019');
create table invoices(
invoice_id number, order_id number, order_date date);
insert into invoices values(1,1,null);
insert into invoices values(2,2,'01-jan-2019');
insert into invoices values(3,3,null);
insert into invoices values(4,4,'01-feb-2019');
insert into invoices values(5,5,'01-APR-2019');
SELECT ORDER_ID , ORDER_DATE FROM ORDERS
INTERSECT
SELECT ORDER_ID , ORDER_DATE FROM INVOICES;
ANSWER IS B,F.
I think the question is what the result of intersect
The result will only include rows where both the order_id and order_date match between the ORDERS and INVOICES tables.
So, order ID 1& 4 has exact match -------- but the 4 1-Fab-2019 is not in result (if you dont consider the Typo in option F)
B seems to be the answer in given circumstances
In Oracle, the INTERSECT operator is used to combine the result sets of two or more SELECT statements and returns only the rows that are common to all result sets.
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.
abdullah_barham
Highly Voted 2 years, 1 month agoMcromeo
1 year, 1 month agoShahedOdeh
4 months agoRik92
Highly Voted 1 year, 11 months agoArslanAltaf
Most Recent 7 months, 2 weeks agoFargo01
9 months, 3 weeks agouselessscript
1 year, 2 months agometallers
1 year, 2 months agoSangiii
1 year, 4 months agoAishMani20
1 year, 6 months agozouve
1 year, 6 months agoNelita
1 year, 7 months agokuff
1 year, 8 months agoRicx24
1 year, 10 months agoShakhzod1999
1 year, 10 months agoSantiBZ_07032022_1744
1 year, 11 months agojfc1
2 years agocadcadley
2 years agocadcadley
2 years agoViviana3184
2 years ago