Its intresting...BOTH queries return the same result
select prod_list, prod_name from products where prod_list = any (select prod_list from products)
select prod_list, prod_name from products where prod_list <> any (select prod_list from products)
'A' can not be correct. The subquery will list 10, 20, 30, 40 while the main query will return any product name that is not equal to any of the subquery list (<> ANY). So, A cannot be correct.
Answer is A and Using NOT IN or <> ANY will not give the same result.
create table products ( prod_id number, prod_name varchar2(10), prod_list number)
insert into products values( 101, 'Plate', 10);
insert into products values( 102, 'Cup', 20);
insert into products values( 103, 'Saucer', 30);
insert into products values( 104, 'Knife', 40);
insert into products values( 105, 'Fork', '');
select prod_name from products where prod_list not in (select prod_list from products)
select prod_name from products where prod_list <> any (select prod_list from products)
A is a correct answer
Using NOT IN or <> ANY will not give the same result.
upvoted 2 times
...
Log in to ExamTopics
Sign in:
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.
braintop
2 weeks agoWadyba
3 months, 1 week agoMcromeo
1 year agolucemqy
1 year agolucemqy
1 year agojm9999
1 year, 2 months agojm9999
1 year, 2 months agoSathitest071
1 year, 8 months agokesammy9
1 year, 9 months ago