Multiple choice technology databases

Which of the following tasks can be performed by using the TO_CHAR function?

  1. Convert '10'to 10

  2. Convert 10 to '10'

  3. Convert 'TEN' to 10

  4. Convert a date to a character expression

Reveal answer Fill a bubble to check yourself
B,D Correct answer
Explanation

The TO_CHAR function in SQL is used to convert numeric or date data types into a character string format. Therefore, converting the number 10 to '10' and converting a date to a string are both valid uses.