A.3. Chapter 3

  1. What is another way to write the following SQL statement by using another function?

    select empno || lpad(initcap(ename),
    40-length(empno),'.')
    "Employee Directory" from emp;

    Answer: You can rewrite the statement using the CONCAT function:

    select concat(empno, lpad(initcap(ename),
    40-length(empno),'.') "Employee Directory" from emp;
  2. Which function would you use to perform an explicit conversion from a number to a string?

    Answer: You can use the TO_CHAR function to convert a number to a string.

  3. How can you rewrite the function call NUMTOYMINTERVAL(17, 'year') using the function TO_YMINTERVAL?

    Answer: You can rewrite the function call as TO_YMINTERVAL('17-00').

  4. What is the result of a number added to a NULL value?

    Answer: The result of ...

Get Oracle Database Foundations now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.