1Z0-060 · Question #156
Which two statements are true regarding single row functions?
The correct answer is B. TRUNC: can be used with number and date values D. SYSDATE: returns the database server current date and time. Among Oracle single-row functions, TRUNC operates on both NUMBER and DATE data types, and SYSDATE returns the current database server date and time.
Question
Which two statements are true regarding single row functions?
Options
- AMOD: returns the quotient of a division
- BTRUNC: can be used with number and date values
- CCONCAT: can be used to combine any number of values
- DSYSDATE: returns the database server current date and time
- EINSTR: can be used to find only the first occurrence of a character in a string
- FTRIM: can be used to remove all the occurrences of a character from a string
How the community answered
(51 responses)- A4% (2)
- B86% (44)
- C8% (4)
- E2% (1)
Why each option
Among Oracle single-row functions, TRUNC operates on both NUMBER and DATE data types, and SYSDATE returns the current database server date and time.
MOD returns the remainder after integer division, not the quotient; for example, MOD(10, 3) returns 1, whereas the quotient would be 3.
TRUNC accepts a NUMBER argument to truncate decimal places (e.g., TRUNC(45.678, 1) = 45.6) and a DATE argument to truncate to a time unit (e.g., TRUNC(SYSDATE, 'MONTH')), making it valid for both numeric and date contexts.
Oracle's CONCAT function is defined to accept exactly two string arguments; combining more than two values in one call is not supported by the function signature.
SYSDATE is a single-row function that takes no arguments and retrieves the current date and time directly from the database server's system clock, not the client machine.
INSTR accepts an optional start_position and occurrence parameter, enabling it to locate any nth occurrence of a substring, not just the first one.
TRIM removes a specified character from only the leading edge, trailing edge, or both ends of a string; it does not remove occurrences of that character from within the interior of the string.
Concept tested: Oracle single-row function behavior and argument restrictions
Source: https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/Single-Row-Functions.html
Topics
Community Discussion
No community discussion yet for this question.