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: A SQL & PL/SQL practice question

Re: A SQL & PL/SQL practice question

From: Spencer <spencerp_at_swbell.net>
Date: Sat, 21 Jul 2001 21:25:40 GMT
Message-ID: <Vnw07.82$9q.7250@nnrp1.sbc.net>

C. is the correct answer.

yes, i agree that the statement can be corrected by changing either the select list or the group by clause. but the question was not "which line should be changed to correct the error"

the question is "on which line does oracle flag the error". and the error is indeed flagged in the "group by" clause. this can be confirmed by running a similarly malformed query in SQL*Plus.

HTH "Dino Hsu" <dino1_nospam_at_ms1.hinet.net> wrote in message news:nnp2ktomrsm0e1v9tfkskv1c9j2q1b4lhn_at_4ax.com...
> Dear all,
>
> A practice question is:
>
> Which line in the following select statement will produce an error?
>
> A.there are no errors in this statement
> B.from EMPLOYEE
> C.group by empid
> D.select dept,avg(salary)
>
> I chose D, but the answer is C.
>
> I know that select and group by don't match, but I have to choose one.
>
> Moreover, why do the choices of this kind of fine-SQL-error question
> come in random sequence? It can lead to confusion without making any
> good. I know there are many OCP out there, can you comment on this?
> Thanks in advance.
>
> Dino
>
Received on Sat Jul 21 2001 - 16:25:40 CDT

Original text of this message

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