Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: OCP Certification

Re: OCP Certification

From: Lucyna Witkowska <ypwitkow_at_nospamcyf-kr.edu.pl>
Date: Mon, 29 Dec 2003 14:10:49 +0000 (UTC)
Message-ID: <bspcl9$3ta$1@srv.cyf-kr.edu.pl>


NicK <nospam_at_emirates.net.ae> wrote:

> Michael J. Moore wrote:

>>>My favourite one:
>>>Consider the following query:
>>> SELECT Item_no FROM Item
>>> WHERE Expiry_date = (SELECT Order_date FROM Order
>>> WHERE Item_no = 2)
>>>Which of the above is true?
>>>A. The subguery will return the Order dates for item no 2 outer query.
>>>B. The subquery will return an error
>>>C. The outer query will return the item no for those items whose expiry
>>>date is the same as the order date for item 2.
>>>D. The outer query will return an error.
>>>Authors said answers A and D are correct.
> Actually, the question is correct. The error is that the Order table 
> will contain more than one row with Item_no=2 therefore you cannot use 
> the "=" operator - you have to use the "IN" operator.

Question is not correct as there will be syntax error: WHERE Expiry_date = (SELECT Order_date FROM Order

                                            *
ERROR at line 2:
ORA-00903: invalid table name

The Whizlabs test authors don't bother to check the examples.

Happy New Year,
Lucy Received on Mon Dec 29 2003 - 08:10:49 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US