Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.
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.
B is wrong
ORA-01789: query block has incorrect number of result columns
E is wrong
ORA-01790: expression must have same datatype as corresponding expression
AD is the correct answer.
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 1 year, 7 months agopaddy95
Highly Voted 1 year, 5 months agozouve
10 months, 1 week agoArslanAltaf
Most Recent 1 week, 6 days agoyaya32
3 months, 2 weeks agoArth1989
3 months, 3 weeks agoyanoolthecool
4 months agoyanoolthecool
4 months agoRaja29
5 months, 1 week agolucemqy
5 months, 2 weeks agoSalmanbutt786
5 months, 2 weeks agoSalmanbutt786
5 months, 2 weeks agometallers
6 months, 1 week agoHassanMkhlalati
7 months, 2 weeks agoArth1989
8 months agosuper04
8 months, 2 weeks agoSushmasri
9 months agoNelita
11 months agoOrxan_H
1 year agofgramos
10 months, 3 weeks agojfc1
1 year, 3 months ago