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?
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?
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;
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.