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
正确答案:B
答案解析:有
微信扫一扫手机做题