OCP Questions [message #133266] |
Thu, 18 August 2005 05:32 |
nirmalnarayan
Messages: 261 Registered: April 2005 Location: India
|
Senior Member |
|
|
Hi,
I found these questions in the forum.
Question No. 01: Which clause excludes the group function?
a. WHERE
b. FROM
c. HAVING
d. GROUP BY
e. ORDER BY
Question No. 02: Select ROUND (TRUNC (MOD (1600, 10), -1), 2) from dual;
a. 0
b. 0.00
c. Error
Can any one help me with answers and explanations ?
Thanks and Regards,
Nirmal N
|
|
|
|
|
Re: OCP Questions [message #134848 is a reply to message #134835] |
Sun, 28 August 2005 03:02 |
tarundua
Messages: 1080 Registered: June 2005 Location: India
|
Senior Member |
|
|
I think u got the answer for the first question and the second is 0 cos ---
SQL> select mod(1600,10) from dual;
MOD(1600,10)
------------
0
applying a function on 0 returns 0.
and
Quote: | trunc(x,-1) would fail with an error
|
It is not so ..
SQL> select trunc(545,1) from dual;
TRUNC(545,1)
------------
545
SQL> select trunc(545,-1) from dual;
TRUNC(545,-1)
-------------
540
SQL> select trunc(545,-2) from dual;
TRUNC(545,-2)
-------------
500
Now i think the picture is clear.
regards,
tarun
|
|
|