Examine this query:
SELECT SUBSTR(SYSDATE, 1, 5) "Result" FROM DUAL;
Which statement is true?
Examine this query:
SELECT SUBSTR(SYSDATE, 1, 5) "Result" FROM DUAL;
Which statement is true?
The query executes successfully with an implicit data type conversion. The SYSDATE function returns a DATE value, but when passed to the SUBSTR function, it is implicitly converted to a string in the default date format, allowing the substring operation to succeed.
Correct answer is D - it executes successfully, my result: 27-02
D works -> implicit conversion!
D, implicit conversion works
select sysdate from dual; --Result : 2/20/2023 10:32:16 AM select substr(sysdate,1,5) as "xxx" from dual; --Result: 20-FE
D tried it and worked