READ Free Dumps For Oracle- 1z0-007
Question ID 7897 | Which SELECT statement will the result 'ello world' from the string 'Hello World'?
|
Option A | SELECT SUBSTR ('Hello',) FROM dual;
|
Option B | SELECT INITCAP (TRIM ('Hello World',1,1) FROM dual;
|
Option C | SELECT LOWER (SUBSTR ('Hello World',1,1) FROM dual;
|
Option D | SELECT LOWER (SUBSTR ('Hello World',2,1) FROM dual;
|
Option E | SELECT LOWER (TRIM ('H' FROM 'Hello World')) FROM dual;
|
Correct Answer | E |
Explanation Explanation/Reference: Explanation: This statement will return correct result because function TRIM() will trim letter 'H' in the 'Hello World' and function LOWER() will return data in string in lowercase.. Incorrect Answers A: This statement will return sub-string starting at the character in position number Y to the end. B: There is incorrect syntax in the TRIM() function. C: There is incorrect syntax in that statement because of absence right bracket. D: There is incorrect syntax in that statement because of absence right bracket. OCP Introduction to Oracle 9i: SQL Exam Guide, Jason Couchman, p. 67-69 Chapter 2: Limiting, Sorting, and Manipulating Return Data
Question ID 7898 | Evaluate this SQL statement: SELECT e.employee_id, (.15* e.salary) + (.5 * e.commission_pct) + (s.sales amount * (.35 * e.bonus)) AS CALC_VALUE FROM employees e, sales s WHERE e.employee_id = s.emp_id; What will happen if you remove all the parentheses from the calculation?
|
Option A | The value displayed in the CALC_VALUE column will be lower.
|
Option B | The value displayed in the CALC_VALUE column will be higher.
|
Option C | There will be no difference in the value displayed in the CALC_VALUE column.
|
Option D | An error will be reported.
|
Correct Answer | C |
Explanation Explanation/Reference: Explanation: There will be no difference in the value displayed in the CALC_VALUE column because not arithmetic operations or usage of alias for the calculated expression in the SELECT clause will not cause change the value appearance. Incorrect Answers A: There will be no difference in the value displayed in the CALC_VALUE column. B: There will be no difference in the value displayed in the CALC_VALUE column. D: There is no error in this statement. OCP Introduction to Oracle 9i: SQL Exam Guide, Jason Couchman, p. 29-34 Chapter 1: Overview of Oracle Databases