1.
Which four statements correctly describe functions that are available in SQL? (Choose four)
2.
Examine the structures of the EMPLOYEES and TAX tables.
EMPLOYEES
EMPLOYEE_ID NUMBER NOT NULL, Primary
Key
EMP_NAME VARCHAR2 (30)
JOB_ID VARCHAR2 (20)
SALARY NUMBER
References
MGR_ID NUMBER
EMPLOYEE_ID
column
DEPARTMENT_ID NUMBER Foreign key to
DEPARTMENT _ID
column of the
DEPARTMENT table
TAX
MIN_SALARY NUMBER
MAX_SALARY NUMBER
TAX_PERCENT NUMBER
Percentage tax for given
salary range
You need to find the percentage tax applicable for each employee. Which SQL statement would you use?
3.
Which are DML statements? (Choose all that apply)
4.
Mary has a view called EMP_DEPT_LOC_VU that was created based on the EMPLOYEES, DEPARTMENTS,
and LOCATIONS tables. She granted SELECT privilege to Scott on this view. Which option enables Scott to
eliminate the need to qualify the view with the name MARY .EMP_DEP_LOC_VU each time the view is
referenced?
5.
Examine the structure of the EMPLOYEES table:
EMPLOYEE_ID NUMBER Primary Key
FIRST_NAME VARCHAR2(25)
LAST_NAME VARCHAR2(25)
HIRE_DATE DATE
You issue these statements:
CREATE table new_emp ( employe_id NUMBER, name VARCGAR2(30)); INSERT INTO new_emp SELECT
employee_id, last_name from employees; Savepoint s1;
UPDATE new_emp set name = UPPER(name);
Savepoint s2;
Delete from new_emp;
Rollback to s2;
Delete from new_emp where employee_id=180;
UPDATE new_emp set name = 'James';
Rollback to s2;
UPDATE new_emp sey name = 'James' Where employee_id=180;
Rollback;
At the end of this transaction, what is true?
6.
In which scenario would index be most useful?
7.
Which SQL statement generates the alias Annual Salary for the calculated column SALARY*12?
8.
Examine the structure of the EMPLOYEES table:
EMPLOYEE_ID NUMBER Primary Key
FIRST_NAME VARCHAR2(25)
LAST_NAME VARCHAR2(25)
DEPARTMENT_ID NUMBER
SALARY NUMBER
What is the correct syntax for an inline view?
9.
Which clause would you use in a SELECT statement to limit the display to those employees whose salary is
greater then 5000?
10.
Examine the structure of the EMPLOYEES table:
EMPLOYEE_ID NUMBER NOT NULL
EMP_NAME VARCHAR2(30)
JOB_ID VARCHAR2(20) DEFAULT 'SA_REP'
SAL NUMBER
COMM_PCT NUMBER
MGR_ID NUMBER
DEPARTMENT_ID NUMBER
You need to update the records of employees 103 and 115. The UPDATE statement you specify should update
the rows with the values specified below:
JOB_ID: Default value specified for this column definition.
SAL: Maximum salary earned for the job ID SA_REP.
COMM_PCT: Default value specified for this commission percentage column, if any. If no default value is
specified for the column, the value should be NULL. DEPARTMENT_ID: Supplied by the user during run time
through substitution variable.
Which UPDATE statement meets the requirements?