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

Which tasks can be performed using SQL functions built into Oracle Database ? (Choose three.)

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



Leave a Reply 20

Your email address will not be published. Required fields are marked *


Luis

Luis

Why not C? CONCAT operator could perform this action?

Luis

Luis

Sorry I mean D.

Oscar Copado Silva

Oscar Copado Silva

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.

Luis

Luis

Great answer, you’re right. Thanks again Oscar.

DD

DD

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 || ??

Sue

Sue

There shouldn’t be limit of || you can use in select statement. But, I don’t think || is considered a SQL function.

sowmi

sowmi

Yes || is not a SQL Function its a SQL Operator

user

user

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?

Justyna

Justyna

You can use To_char to display date in different formats

Ritam Tiwari

Ritam Tiwari

option D :
This should be correct.

can anybody explain why option C is correct????

Justyna

Justyna

D is incorrect. Function CONCAT can concatenate only 2 columns.

C is correct – there is function REPLACE.

Ritam Tiwari

Ritam Tiwari

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.

Justyna

Justyna

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

davor

davor

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.

riccia

riccia

‘concat’ function can be operated only on 2 variables or columns, while ‘concat’ operation can be
done for any number of variables or columns.

Alvin2201

Alvin2201

An expression is an arbitrarily complex combination of variables, constants, literals, operators, and function calls

XY

XY

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.

Keith Bascom

Keith Bascom

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

click here.

click here.

At this moment I am ready to do my breakfast, once having my breakfast coming yet again to read other news.|

The Tuk

The Tuk

A. TO_DATE function
B. LENGTH function
C. REPLACE function
D. Concatenation Operation