Correct Answer : Get Lastest Questions and Answer : Exp: he Oracle/PLSQL LENGTH2 function returns the length of the specified string, using UCS2 code points.
SYNTAX
The syntax for the Oracle/PLSQL LENGTH2 function is:
LENGTH2( string1 ) Parameters or Arguments
string1 is the string to return the length for. string1 can be CHAR, VARCHAR2, NCHAR, or NVARCHAR2. string1 can not be CLOB or NCLOB.
NOTE
If string1 is NULL, then the LENGTH2 function will return NULL.
Question : What value is returned after executing the following statement? SELECT supplier_id, supplier_name FROM suppliers WHERE supplier_id >= 500 UNION SELECT company_id, company_name FROM companies WHERE company_name = 'Apple' ORDER BY 2; 1. First Half data would be sorted based on supplier_name 2. Data would be sorted based on supplier_name but could be random because of different column names 3. Access Mostly Uused Products by 50000+ Subscribers 4. Error
Correct Answer : Get Lastest Questions and Answer : Exp: The Oracle UNION operator is used to combine the result sets of 2 or more Oracle SELECT statements. It removes duplicate rows between the various SELECT statements.
Each SELECT statement within the UNION operator must have the same number of fields in the result sets with similar data types.
SYNTAX
The syntax for the Oracle UNION operator is:
SELECT expression1, expression2, ... expression_n FROM tables WHERE conditions UNION SELECT expression1, expression2, ... expression_n FROM tables WHERE conditions; Parameters or Arguments
expression1, expression2, expression_n are the columns or calculations that you wish to retrieve.
tables are the tables that you wish to retrieve records from. There must be at least one table listed in the FROM clause.
conditions are conditions that must be met for the records to be selected.
Question : What value is returned after executing the following statement? SELECT supplier_id, supplier_name FROM suppliers WHERE state = 'California' UNION ALL SELECT company_id, company_name FROM companies WHERE company_id > 1000 ORDER BY 2; 1. First Half data would be sorted based on supplier_name 2. Data would be sorted based on supplier_name but could be random because of different column names 3. Access Mostly Uused Products by 50000+ Subscribers 4. Error
Correct Answer : Get Lastest Questions and Answer : Exp: In this Oracle UNION ALL operator, since the column names are different between the two SELECT statements, it is more advantageous to reference the columns in the ORDER BY clause by their position in the result set. In this example, we've sorted the results by supplier_name / company_name in ascending order, as denoted by the "ORDER BY 2".