An application needs a table for each connection that tracks the ID and Name of all items previously ordered and committed within the connection. The table also needs to be cleaned up and automatically removed each time a connection is ended. Assuming the

题目

An application needs a table for each connection that tracks the ID and Name of all items previously ordered and committed within the connection. The table also needs to be cleaned up and automatically removed each time a connection is ended. Assuming the ITEMS table was created with the following SQL statement:CREATE TABLE items item_no INT, item_name CHAR(5), item_qty INT)Which of the following SQL statements will provide the table definition that meets the specified requirements?()

A.DECLARE GLOBAL TEMPORARY TABLE tracker AS (SELECT item_no, item_name FROM items) WITH NO DATA ON COMMIT PRESERVE ROWS ON DISCONNECT DROP TABLE

B.DECLARE GLOBAL TEMPORARY TABLE tracker AS (SELECT item_no, item_name FROM items) WITH NO DATA ON COMMIT PRESERVE ROWS

C.CREATE TABLE systmp.tracker AS (SELECT item_num, item_name FROM items) WITH NO DATA ON COMMIT PRESERVE ROWS

D.CREATE TABLE tracker AS (SELECT item_num, item_name FROM items) ON COMMIT PRESERVE ROWS ON DISCONNECT DROP TABLE


相似考题
更多“An application needs a table for each connection that tracks the ID and Name of all items ”相关问题
  • 第1题:

    You created a view called EMP_DEPT_VU that contains three columns from the EMPLOYEES and DEPARTMENTS tables:EMPLOYEE_ID, EMPLOYEE_NAME AND DEPARTMENT_NAME.The DEPARTMENT_ID column of the EMPLOYEES table is the foreign key to the primary keyDEPARTMENT_ID column of the DEPARTMENTS table.You want to modify the view by adding a fourth column, MANAGER_ID of NUMBER data type from the EMPLOYEES tables.How can you accomplish this task? ()

    A. ALTER VIEW EMP_dept_vu (ADD manger_id NUMBER);

    B. MODIFY VIEW EMP_dept_vu (ADD manger_id NUMBER);

    C. ALTER VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employee e, departments d WHERE e.department _ id = d.department_id;

    D. MODIFY VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employees e, departments d WHERE e.department _ id = d.department_id;

    E. CREATE OR REPLACE VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employees e, departments d WHERE e.department _ id = d.department_id;

    F. You must remove the existing view first, and then run the CREATE VIEW command with a new column list to modify a view.


    参考答案:E

  • 第2题:

    Click the Exhibit button and examine the data in the EMPLOYEES and DEPARTMENTS tables.You want to retrieve all employees‘ last names, along with their managers‘ last names and their department names. Which query would you use?()

    A.SELECT last_name, manager_id, department_name FROM employees e FULL OUTER JOIN departments d ON (e.department_id = d.department_id);

    B.SELECT e.last_name, m.last_name, department_name FROM employees e LEFT OUTER JOIN employees m on ( e.manager_id = m.employee_id) LEFT OUTER JOIN departments d ON (e.department_id = d.department_id);

    C.SELECT e.last_name, m.last_name, department_name FROM employees e RIGHT OUTER JOIN employees m on ( e.manager_id = m.employee_id) LEFT OUTER JOIN departments d ON (e.department_id = d.department_id);

    D.SELECT e.last_name, m.last_name, department_name FROM employees e LEFT OUTER JOIN employees m on ( e.manager_id = m.employee_id) RIGHT OUTER JOIN departments d ON (e.department_id = d.department_id);

    E.SELECT e.last_name, m.last_name, department_name FROM employees e RIGHT OUTER JOIN employees m on ( e.manager_id = m.employee_id) RIGHT OUTER JOIN departments d ON (e.department_id = d.department_id);

    F.SELECT last_name, manager_id, department_name FROM employees e JOIN departments d ON (e.department_id = d.department_id) ;


    参考答案:B

  • 第3题:

    有Table1,Table2两表,Table2是Table1的从表,Table1表有字段head_id(主键)和head_name,Table2表有字段Line_id(主键),head_id(外键),line_name,现要求查询统计出有那些hand_name在Table2表中有2条以上的数据。请写出你的SQL语句。


    正确答案:select t1.head_name, count(1)   from Table1 t1, Table2 t2  where t1. head_id = t2. head_id  group by t1.head_name  having count(1)>2  

  • 第4题:

    ExhibitExamine the data in the EMPLOYEES and DEPARTMENTS tables.You want to retrieve all employees‘ last names, along with their manager‘s last names and their department names. Which query would you use?()

    A. SELECT last_name, manager_id, department_name FROM employees e FULL OUTER JOIN department d ON (e.department_id = d.department_id);

    B. SELECT e.last_name, m.last_name, department_name FROM employees e LEFT OUTER JOIN employees m on ( e.managaer_id = m.employee_id) LEFT OUTER JOIN department d ON (e.department_id = d.department_id);

    C. SELECT e.last_name, m.last_name, department_name FROM employees e RIGT OUTER JOIN employees m on ( e.manager_id = m.employee_id) FULL OUTER JOIN department d ON (e.department_id = d.department_id);

    D. SELECT e.last_name, m.last_name, department_name FROM employees e LEFT OUTER JOIN employees m on ( e.manager_id = m.employee_id) RIGT OUTER JOIN department d ON (e.department_id = d.department_id);

    E. SELECT e.last_name, m.last_name, department_name FROM employees e RIGHT OUTER JOIN employees m on ( e.manager_id = m.employee_id) RIGHT OUTER JOIN departments d ON (e.department_id = d.department_id)

    F. SELECT last_name, manager_id, department_name FROM employees e JOIN department d ON (e.department_id = d.department_id);


    参考答案:B

  • 第5题:

    物化视图日志默认的名字是:()

    A. M$LOG_TABLE_NAME

    B. MLOG$_TABLE_NAME

    C. MLOG_ TABLE_NAME


    参考答案B

  • 第6题:

    【单选题】下面属于RESTful风格请求的是。

    A.http://.../queryItems?id=1

    B.http://.../queryItems?id=1&name=zhangsan

    C.http://.../items/1

    D.http://.../queryitems/1


    http://.../items/1