A D
create table briks ( brick_id number(38)
, shape varchar2(30)
, color varchar2(30)
, weight number );
create table bricks_stage( weight number
, shape varchar2(30)
, color varchar2(30));
--A +
select brick_id , shape from briks
minus
select weight, color from bricks_stage;
--B -
select * from briks
minus
select * from bricks_stage;
-- C -
select shape, color from briks
minus
select weight, color from bricks_stage;
-- D +
select shape, color from briks
minus
select color, shape from bricks_stage;
--E
select shape, color, weight from briks
minus
select * from bricks_stage;
B- AND C ARE FALSE
B - Return error, coz no of column must be same in both queries.
C- will also return error, coz expression must have same datatype in both queries.
AD is Correct answer.
Use Minus operator to return all distinct rows selected by the first query, but not present in the second query result set.
In Minus operator, the number of columns must be the same and data type of columns being selected by the SELECT statements in queries must belong to the same data type group in all the SELECT statements used in the query. The names of the columns, however, need not be identical.
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.
Artur1991
Highly Voted 2 years, 4 months agopaddy95
Highly Voted 2 years, 2 months agozouve
1 year, 7 months agoThameur01
Most Recent 5 days, 23 hours agomage2611
7 months agoAyman_Khalifa
6 months, 2 weeks agoArslanAltaf
9 months, 2 weeks agoyaya32
1 year agoArth1989
1 year agoyanoolthecool
1 year, 1 month agoyanoolthecool
1 year, 1 month agoRaja29
1 year, 2 months agolucemqy
1 year, 2 months agoSalmanbutt786
1 year, 2 months agoSalmanbutt786
1 year, 2 months agometallers
1 year, 3 months agoHassanMkhlalati
1 year, 4 months agoArth1989
1 year, 5 months agosuper04
1 year, 5 months agoSushmasri
1 year, 6 months agoNelita
1 year, 8 months ago