A is not necessarily be true. DB applies implicit conversation which sometimes will not work. https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/NVL.html
A: NVL must have expressions of same datatype
my inputs- here in option used must have hence it is not right
SELECT NVL(ENAME, 0) FROM EMP; -- Here Ename is Varchar2 and we are passing 0 Number data type as second parameter. In this scenario, NVL working for 2 different datatypes.
E is not right because
NVL2 (expr1, expr2, expr3)
expr1 is the source value or expression that may contain null
expr2 is the value returned if expr1 is not null
expr3 is the value returned if expr1 is null
F is not right because
The COALESCE() function returns the first non-null value in a list.
DE is correct:
D. COALESCE stops evaluating the list of expressions when it finds the first non-null value. TRUE
https://www.oracletutorial.com/oracle-comparison-functions/oracle-coalesce/
E. The first expression in NVL2 is never returned. TRUE
If expr1 is not null, then NVL2 returns expr2. If expr1 is null, then NVL2 returns expr3. (https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/NVL2.html)
It should be AD.
A: it is true that oracle can make implicit conversions but still the NVL function requires that the two exps be of the same data type. Hence A is correct
E is wrong because if we specified that we want the same exp to be returned when it's not null it would return its first exp. Tried this in Toad and got 'h1'
select nvl2('h1', 'h1', 4) from dual;
nvl2(expression1,expression2,expression3)
so even expression2 = expression1 we will not say expression1 is returned
A: we can implicitly use different type of data with nvl
select nvl(1,'1') from dual; it will work so A is incorrect
D,E is correct.
Yes, but some values can be impicit converted into anotherdata type like nvl(1,'1').
upvoted 3 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.
odi_USER
6 days, 12 hours agoArslanAltaf
2 months, 4 weeks agolucemqy
8 months agoHassanMkhlalati
8 months, 2 weeks agoSangiii
10 months, 3 weeks agoHassanMkhlalati
8 months, 2 weeks agoanushamathew12071997
11 months, 2 weeks agoanushamathew12071997
11 months, 3 weeks agoanushamathew12071997
11 months, 3 weeks agozouve
1 year agoESZ
1 year, 1 month agoCMjer
1 year, 2 months agoESZ
1 year, 2 months agoEltelwany
1 year, 4 months agoCyberP
1 year, 1 month agolorenzo87
1 year, 5 months agoMorticiaAAddams
1 year, 5 months ago