Oracle OCP认证-Oracle OCM认证

您当前的位置:优技教育 > ocp考试 >

ocp 11g认证考试题:1Z0-051-074题

来源:优技教育

ocp 11g认证考试题:1Z0-051-074题,完整题库请点击这里联系老师咨询了解

74. Which statements are true regarding single row functions? (Choose all that apply.)

A. MOD : returns the quotient of a division

B. TRUNC : can be used with NUMBER and DATE values

C. CONCAT : can be used to combine any number of values

D. SYSDATE : returns the database server current date and time

E. INSTR : can be used to find only the first occurrence of a character in a string

F. TRIM : can be used to remove all the occurrences of a character from a string

Answer: BD

答案解析:

A.MOD:返回除法运算的余数

B.TRUNC:返回除法运算的余数,可用于数字和日期。

C.CONCAT:将值联接在一起(CONCAT 函数中只能使用两个参数)

D.SYSDATE:返回当前数据库服务器的日期和时间

E.INSTR:查找指定字符串的数字位置

F.TRIM:截去字符串首字符或尾字符(或者两者都截去)(如果trim_character或trim_source 是一个字符文字,则必须将其放在单引号内)

由上可看,A,返回的应为除法运算的余数而不是商,所以错误;B TRUNC可用于数字和日期,正确;C CONCAT 只能连接两个值,所以错误;D,SYSDATE 返回当前数据库服务器的日期和时间,正确;E,INSTR 查找指定字符串的数字位置,而不是题中所描述的,F, TRIM 截去字符串首字符或尾字符(或者两者都截去),而题中所描述的为replace函数。

精华阅读