Which tasks can be performed using SQL functions built into Oracle Database ? (Choose three.)
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
D.
combining more than two columns or expressions into a single column in the output
Why not C? CONCAT operator could perform this action?
Sorry I mean D.
it says more than TWO columns Luis , in order to do it with concat you will need to anidate functions
concat ( x, concat ( y,z ) )
Concat function only allows two parameters.
Great answer, you’re right. Thanks again Oscar.
SELECT concat(employee_id, concat(first_name, last_name))
from employees;
works fine nested so D should be a correct answer
and where is there a limit to how many columns you can join into single column output using || ??
There shouldn’t be limit of || you can use in select statement. But, I don’t think || is considered a SQL function.
Yes || is not a SQL Function its a SQL Operator
Option A: displaying a date in a nondefault format
Is TO_DATE the function to use, when we want to display a date in a nondefault format?
You can use To_char to display date in different formats
option D :
This should be correct.
can anybody explain why option C is correct????
D is incorrect. Function CONCAT can concatenate only 2 columns.
C is correct – there is function REPLACE.
Why option B is correct????Please tell me the oracle function supporting this.
finding the number of charaters in an expression????
eg: a*b/c
It should show 3 for this.
In your example the answer is 5: 3 letters and 2 arithmetic characters.
select length(‘a*b/c’) from dual;
LENGTH(‘A*B/C’)
—————
5
But ‘A*B/C’ is not an expression, but a character literal. I don’t think you can take the length of an expression, only the length of the result of tha expression. So B is false in my opinion.
‘concat’ function can be operated only on 2 variables or columns, while ‘concat’ operation can be
done for any number of variables or columns.
An expression is an arbitrarily complex combination of variables, constants, literals, operators, and function calls
I don’t know why B is correct, either.
For example “AA BB”
Length(“AA BB”) is 5, But the number of characters should be 4.
Which function can get 4?
Thanks.
Thought-provoking article ! For my two cents , if anyone requires to rearrange PDF or PNG files , We came upon piece of writing here http://goo.gl/l0aJhN
At this moment I am ready to do my breakfast, once having my breakfast coming yet again to read other news.|
A. TO_DATE function
B. LENGTH function
C. REPLACE function
D. Concatenation Operation