多项选择题Which are DML statements? ()

A.COMMIT
B.MERGE
C.UPDATE
D.DELETE
E.CREATE
F.DROP


您可能感兴趣的试卷

你可能感兴趣的试题

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?()

A. SELECT employee_id, salary, tax_percent FROM employees e, tax t WHERE e.salary BETWEEN t.min _ salary AND t.max_salary
B. SELECT employee_id, salary, tax_percent FROM employees e, tax t WHERE e.salary > t.min_salary, tax_percent
C. SELECT employee_id, salary, tax_percent FROM employees e, tax t WHERE MIN(e.salary) = t.min_salary AND MAX(e.salary) = t.max_salary
D. You cannot find the information because there is no common column between the two tables.

3.多项选择题Which two statements are true regarding the ORDER BY clause? ()

A. The sort is in ascending by order by default.
B. The sort is in descending order by default.
C. The ORDER BY clause must precede the WHERE clause.
D. The ORDER BY clause is executed on the client side.
E. The ORDER BY clause comes last in the SELECT statement.
F. The ORDER BY clause is executed first in the query execution.

4.多项选择题Which two tasks can your perform by using the TO_CHAR function? ()

A.Convert 10 to 'TEN'
B.Convert '10' to 10
C.Convert '10' to '10'
D.Convert 'TEN' to 10
E.Convert a date to a character expression
F.Convert a character expression to a date

6.多项选择题

Examine the data from the EMP table:
EMP_ID DEPT_ID COMMISSION
1 10 500
2 20 1000
3 10
4 10 600
5 30 800
6 30 200
7 10
8 20 300
The COMMISSION column shows the monthly commission earned by the employee. Which three tasks would require subqueries or joins in order to perform in a single step? ()

A. Deleting the records of employees who do not earn commission.
B. Increasing the commission of employee 3 by the average commission earned in department 20.
C. Finding the number of employees who do NOT earn commission and are working for department 20.
D. Inserting into the table a new employee 10 who works for department 20 and earns a commission that is equal to the commission earned by employee 3.
E. Creating a table called COMMISSION that has the same structure and data as the columns EMP_ID and COMMISSIONS of the EMP table.
F. Decreasing the commission by 150 for the employees who are working in department 30 and earning a commission of more then 800.

7.多项选择题Which four statements correctly describe functions that are available in SQL? ()

A. INSTR returns the numeric position of a named character.
B. NVL2 returns the first non-null expression in the expression list.
C. TRUNCATE rounds the column, expression, or value to n decimal places.
D. DECODE translates an expression after comparing it to each search value.
E. TRIM trims the heading of trailing characters (or both) from a character string.
F. NVL compares two expressions and returns null if they are equal, or the first expression of they are not equal.
G. NULLIF compares twp expressions and returns null if they are equal, or the first expression if they are not equal.

8.单项选择题

Examine the structure if the EMPLOYEES table:

You need to create a view called EMP_VU that allows the user to insert rows through the view. Which SQL statement, when used to create the EMP_VU view, allows the user to insert rows?()

A. CREATE VIEW emp_Vu AS   SELECT employee_id, emp_name,   department_id   FROM employees   WHERE mgr_id IN (102, 120);
B. CREATE VIEW emp_Vu AS   SELECT employee_id, emp_name, job_id   department_id   FROM employees   WHERE mgr_id IN (102, 120);
C. CREATE VIEW emp_Vu AS   SELECT department_id, SUM(sal) TOTALSAL   FROM employees   WHERE mgr_id IN (102, 120)   GROUP BY department_id;
D. CREATE VIEW emp_Vu AS   SELECT employee_id, emp_name, job_id,   DISTINCT department_id   FROM employees;

9.单项选择题

Examine the structure of the STUDENTS table:
STUDENT_ID NUMBER NOT NULL, Primary Key
STUDENT_NAME VARCHAR2(30)
COURSE_ID VARCHAR2(10) NOT NULL
MARKS NUMBER
START_DATE DATE
FINISH_DATE DATE
You need to create a report of the 10 students who achieved the highest ranking in the course INT SQL and who completed the course in the year 1999.
Which SQL statement accomplishes this task?()

A. SELECT student_ id, marks, ROWNUM "Rank" FROM students WHERE ROWNUM <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course_id = 'INT_SQL' ORDER BY marks DESC;
B. SELECT student_id, marks, ROWID "Rank" FROM students WHERE ROWID <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course_id = 'INT_SQL' ORDER BY marks;
C. SELECT student_id, marks, ROWNUM "Rank" FROM (SELECT student_id, marks FROM students WHERE ROWNUM <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course_id = 'INT_SQL' ORDER BY marks DESC);
D. SELECT student_id, marks, ROWNUM "Rank" FROM (SELECT student_id, marks FROM students ORDER BY marks DESC) WHERE ROWNUM <= 10 AND finish_date BETWEEN '01-JAN-99' AND '31-DEC-99' AND course _ id ='INT _ SQL';

10.单项选择题You need to create a view EMP_VU. The view should allow the users to manipulate the records of only the employees that are working for departments 10 or 20.Which SQL statement would you use to create the view EMP_VU?()

A. CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20);
B. CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH READ ONLY;
C. CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH CHECK OPTION;
D. CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20);
E. CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) NO UPDATE;