Click the Exhibit button to examine the structures of the EMPLOYEES and TAX tables.
You need to find the percentage tax applicable for each employee. Which SQL statement would
you use?
A.
You cannot find the information because there is no common column between the two tables.
QUESTION 46
Which SELECT statement will get the result ‘elloworld’ from the string ‘HelloWorld’?
SELECT SUBSTR( ‘HelloWorld’,1) FROM dual;
B.
SELECT employee_id, salary, tax_percent
FROM employees e JOIN tax t
WHERE e.salary > t.min_salary AND < t.max_salary;
SELECT INITCAP(TRIM (‘HelloWorld’, 1,1)) FROM dual;
C.
SELECT employee_id, salary, tax_percent
FROM employees e JOIN tax t
ON e.salary BETWEEN t.min_salary AND t.max_salary;
SELECT LOWER(TRIM (‘H’ FROM ‘HelloWorld’)) FROM dual;
D.
SELECT employee_id, salary, tax_percent
FROM employees e JOIN tax t
ON (MIN(e.salary) = t.min_salary
AND MAX(e.salary) = t.max_salary);
SELECT LOWER(SUBSTR(‘HelloWorld’, 1, 1) FROM dual;
A.
You cannot find the information because there is no common column between the two tables.
QUESTION 46
Which SELECT statement will get the result ‘elloworld’ from the string ‘HelloWorld’?
SELECT SUBSTR( ‘HelloWorld’,1) FROM dual;
A.
You cannot find the information because there is no common column between the two tables.
QUESTION 46
Which SELECT statement will get the result ‘elloworld’ from the string ‘HelloWorld’?
SELECT SUBSTR( ‘HelloWorld’,1) FROM dual;
B.
SELECT employee_id, salary, tax_percent
FROM employees e JOIN tax t
WHERE e.salary > t.min_salary AND < t.max_salary;
SELECT INITCAP(TRIM (‘HelloWorld’, 1,1)) FROM dual;
C.
SELECT employee_id, salary, tax_percent
FROM employees e JOIN tax t
ON e.salary BETWEEN t.min_salary AND t.max_salary;
SELECT LOWER(TRIM (‘H’ FROM ‘HelloWorld’)) FROM dual;
D.
SELECT employee_id, salary, tax_percent
FROM employees e JOIN tax t
ON (MIN(e.salary) = t.min_salary
AND MAX(e.salary) = t.max_salary);
SELECT LOWER(SUBSTR(‘HelloWorld’, 1, 1) FROM dual;
E.
SELECT LOWER(SUBSTR(‘HelloWorld’, 2, 1) FROM dual;
Explanation:
You can find the percentage tax applicable for each employee by using SQL statement in answer
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..OCP Introduction to Oracle 9i: SQL Exam Guide, Jason Couchman, p. 67-69
Chapter 2: Limiting, Sorting, and Manipulating Return Data
C