Question : What value is returned after executing the following statement? select CAST( '22-Aug-2003' AS varchar2(30) ) from dual; 1. This would convert the date (ie: 22-Aug-2003) into a varchar2(30) value. 2. This would convert the date (ie: 22-Aug-2003) into a Number(30) value. 3. Access Mostly Uused Products by 50000+ Subscribers 4. Error
number is the value used to find the smallest integer value.
Question : Select the statement which is equivalent to below block IF address1 is not null THEN result := address1;
ELSIF address2 is not null THEN result := address2;
ELSIF address3 is not null THEN result := address3;
ELSE result := null;
END IF; 1. SELECT COMPOSE( address1, address2, address3 ) result FROM suppliers; 2. SELECT COALESCE( address1, address2, address3 ) result FROM suppliers; 3. Access Mostly Uused Products by 50000+ Subscribers FROM suppliers; 4. SELECT NVL( address1, address2, address3 ) result FROM suppliers;
Correct Answer : Get Lastest Questions and Answer : Exp: The Oracle/PLSQL COALESCE function returns the first non-null expression in the list. If all expressions evaluate to null, then the COALESCE function will return null. SYNTAX The syntax for the Oracle/PLSQL COALESCE function is: COALESCE( expr1, expr2, ... expr_n ) Parameters or Arguments : expr1 to expr_n are the expressions to test for non-null values. The COALESCE function can be used in Oracle/PLSQL. You could use the coalesce function in a SQL statement as follows: SELECT COALESCE( address1, address2, address3 ) result FROM suppliers; The COALESCE function will compare each value, one by one.