nerdexam
Oracle

1Z0-060 · Question #154

Which three tasks can be performed using SQL functions built into Oracle Database?

The correct answer is A. Displaying a date in a nondefault format B. Finding the number of characters in an expression C. Substituting a character string in a text expression with a specified string. Oracle provides built-in single-row functions to format dates, measure string length, and substitute strings; however, the built-in CONCAT function accepts only exactly two arguments.

Upgrading to Oracle Database 12c

Question

Which three tasks can be performed using SQL functions built into Oracle Database?

Options

  • ADisplaying a date in a nondefault format
  • BFinding the number of characters in an expression
  • CSubstituting a character string in a text expression with a specified string
  • DCombining more than two columns or expressions into a single column in the output

How the community answered

(23 responses)
  • A
    91% (21)
  • D
    9% (2)

Why each option

Oracle provides built-in single-row functions to format dates, measure string length, and substitute strings; however, the built-in CONCAT function accepts only exactly two arguments.

ADisplaying a date in a nondefault formatCorrect

The TO_CHAR function converts a date to a character string using a user-specified format mask (e.g., TO_CHAR(SYSDATE, 'DD-MON-YYYY')), allowing any nondefault date display format.

BFinding the number of characters in an expressionCorrect

The LENGTH function returns the total number of characters in a string expression, directly fulfilling the task of finding expression length.

CSubstituting a character string in a text expression with a specified stringCorrect

The REPLACE function scans a source string and substitutes every occurrence of a specified search string with a given replacement string.

DCombining more than two columns or expressions into a single column in the output

Oracle's built-in CONCAT function accepts exactly two string arguments; combining more than two columns requires nesting multiple CONCAT calls or using the || operator, so a single built-in function call cannot combine more than two values.

Concept tested: Oracle built-in single-row string and date functions

Source: https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/Single-Row-Functions.html

Topics

#SQL functions#string functions#date functions#built-in functions

Community Discussion

No community discussion yet for this question.

Full 1Z0-060 Practice