NULLIF must have the same data type, not use number and string in the same expression.
COALESCE returns the first non-null value of the expression, but without using numbers and string.
D,E is correct
A. ORA-00932: inconsistent datatypes: expected - got CHAR
B. ORA-00932: inconsistent datatypes: expected NUMBER got CHAR
C. ORA-00932: inconsistent datatypes: expected NUMBER got CHAR
D. SQL> SELECT COALESCE(100, NULL, 200) FROM DUAL;
COALESCE(100,NULL,200)
----------------------
100
E. SQL> SELECT NULLIF(100, 100) FROM DUAL;
NULLIF(100,100)
---------------
D and E are correct
SQL> SELECT COALESCE(100, NULL, 200) FROM DUAL;
COALESCE(100,NULL,200)
----------------------
100
SQL> SELECT NULLIF(100, 100) FROM DUAL;
NULLIF(100,100)
---------------
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.
Oracle2020
3 months, 1 week agoOracle2020
3 months, 1 week agohezzy
5 months, 2 weeks agoauwia
1 year agoRaNik69
1 year, 1 month agoBeomK
1 year, 2 months agoBolillo
1 year, 4 months agoivanadj
1 year, 5 months ago