Which tasks can be performed using SQL functions that are built into Oracle database ? (Choose
three .)
A.
f inding the remainder of a division
B.
a dding a number to a date for a resultant date value
C.
c omparing two expressions to check whether they are equal
D.
c hecking whether a specified character exists in a given string
E.
r emoving trailing, leading, and embedded characters from a character string
I think E is posible with TRIM function, isnt it?
TRIM can remove the leading and trailing characters, but not embedded ones.
is C correct?
is there any sql function for comparing two expressions to check whether they are equal?
I think nullif(s1,s2)
if its equal return NULL else return s1
Check also the DECODE function.
B is correct
add_months(date, n) returns date
n is a number
add_months(’19-JUL-2012′,1)
returns 19-AUG-2012;
adding a number to a date returns date value
I agree. Isnt answer B correct?
Sorry C is right NULLIF fun tests for equality.
Why isn’t B correct?
is add_months(date,n) a SQL build in function?
Yes, add_months(date,n) is a SQL build in function: http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions004.htm
Why isn’t B correct?
is add_months(date,n) a SQL build in function?
i am always wrong in this question.
I guess B is correct
Ya why is B not selected?It is correct ADD_MONTHS(date,number)=DATE
B is correct.
select sysdate +1 from dual
result will add a next date
B SHOULD BE CORRECT….WHY IT IS MARKED AS INCORRECT HERE????
SELECT TO_CHAR(
ADD_MONTHS(hire_date,1),
‘DD-MON-YYYY’) “Next month”
FROM employees
WHERE last_name = ‘Baer’;
Next Month
———–
07-JUL-1994
b.adding a number to a date for a resultant date value this operation dose not need to use oracle built in function
E is correct: select replace(‘babcdb’,’b’) from dual;
It says embedded, that’s not rigth.
Yes embedded or intermediate why not E?
select replace(‘abc’,’b’) from dual;
gives –> ac
ACD
I think that B is correct.
A. REMAINDER function
B. ADD_MONTHS function
C. Comparison Conditions
D. INSTR function
E. TRIM enables you to trim leading or trailing characters (or both) from a character string.