A. It fails unless the expression is modified to SUBSTR(TO_CHAR(SYSDATE), 1, 5).
This statement is correct because the SUBSTR function needs a string as input, and SYSDATE must be converted to a string using TO_CHAR. The correct syntax would be SUBSTR(TO_CHAR(SYSDATE, 'DD-MON-YYYY'), 1, 5) if you wanted to extract the first 5 characters from the formatted date.
select sysdate from dual;
--Result : 2/20/2023 10:32:16 AM
select substr(sysdate,1,5) as "xxx"
from dual;
--Result: 20-FE
upvoted 2 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.
Bissto
2 months, 2 weeks agozzz02
1 month, 3 weeks agoyaya32
9 months, 4 weeks agolucemqy
1 year agoRik92
1 year, 7 months agoOrakol
1 year, 8 months agojfc1
1 year, 8 months ago