1.
You need to display the last names of those employees who have the letter "A" as the second character in their
names.
Which SQL statement displays the required results?
2.
You need to perform certain data manipulation operations through a view called EMP_DEPT_VU, which you
previously created.
You want to look at the definition of the view (the SELECT statement on which the view was create.) How do
you obtain the definition of the view?
3.
Evaluate this SQL statement:
SELECT e.EMPLOYEE_ID,e.LAST_NAME,e.DEPARTMENT_ID, d.DEPARTMENT_NAME FROM EMP e,
DEPARTMENT d
WHERE e.DEPARTMENT_ID = d.DEPARTMENT_ID;
In the statement, which capabilities of a SELECT statement are performed?
4.
You define a multiple-row subquery in the WHERE clause of an SQL query with a comparison operator "=".
What happens when the main query is executed?
5.
You need to calculate the total of all salaries in the accounting department. Which group function should you
use?
6.
What is true about joining tables through an equijoin?
7.
Scott issues the SQL statements:
CREATE TABLE dept
(deptno NUMBER(2),
dname VARCHAR2(14),
loc VARCHAR2(13)};
GRANT SELECT
ON DEPT
T0 SUE;
If Sue needs to select from Scott's DEPT table, which command should she use?
8.
Which clause should you use to exclude group results?
9.
A subquery can be used to _________.
10.
The EMPLOYEES table contains these columns:
LAST_NAME VARCHAR2 (25)
SALARY NUMBER (6,2)
COMMISSION_PCT NUMBER (6)
You need to write a query that will produce these results:
1. Display the salary multiplied by the commission_pct.
2. Exclude employees with a zero commission_pct.
3. Display a zero for employees with a null commission value.
Evaluate the SQL statement:
SELECT LAST_NAME, SALARY*COMMISSION_PCT
FROM EMPLOYEES
WHERE COMMISSION_PCT IS NOT NULL;
What does the statement provide?