View the Exhibit and examine the structure of the products table.
What would be the outcome of executing the above SQL statement?
A.
It produces an error.
B.
It shows the names of all products in the table.
C.
It shows the names of products whose list price is the second highest in the table.
D.
It shows the names of all products whose list price is less than the maximum list price.
Explanation:
Yes, C
I think the right answer is A, it would be D if the first subquery would have ‘IN’ instead of ‘=’, don’t you agree? The sub-queries brings a list of results which have to be handled by the = , that would bring an error. Single row subqueries use = , Multiple row subqueries IN .
Run the query in your sample DB then comment.
It works and the answer is C.
I enjoy reading through a post that will make people think. Also, thank you for allowing for me to comment!|
After checking out a few of the blog articles on your web page, I truly appreciate your technique of blogging. I book-marked it to my bookmark site list and will be checking back soon. Please visit my website as well and tell me your opinion.|