CREATE UNIQUE INDEX xtab1 ON tab1 (c1) include (c2)
CREATE UNIQUE INDEX xtab1 ON tab1 (c1); CREATE INDEX xtab2 ON tab1 (c3) INCLUDE (c2)
CREATE UNIQUE INDEX xtab1 ON tab1 (c2, c1)
CREATE UNIQUE INDEX xtab1 ON tab1 (c2) INCLUDE (c1)
第1题:
以下选项中能正确把c1定义成结构体变量的是( )。
A.typedef struct { int red; int red; int green; int blue; }COLOR; COLOR c1;
B.struct color c1 { int red int red; int green int blue; };
C.stmctcolor { int red, int green; int blue; }c1;
D.struct { int red; int green; int blue; }c1;
第2题:
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
第3题:
Given the following DDL for the PARTS table:CREATE TABLE parts (part_no INT(9) NOT NULL, part_name VARCHAR(24), part_remain INT(9));All part numbers entered will be different and all rows should be displayed in order of increasing part numbers whenever the table is queried. Which of the following create index statements will meet this criteria and require the least amount of storage for the index object?()
A.CREATE UNIQUE INDEX idx_partno ON parts(part_no)
B.CREATE UNIQUE INDEX idx_partno ON parts(part_name ASC)
C.CREATE UNIQUE INDEX idx_partno ON parts(part_name, part_no ASC)
D.CREATE UNIQUE INDEX idx_partno ON parts(part_no, part_name ASC)
第4题:
建立一个学生信息表student,要求它由学号sno,姓名sname,性别sex,年龄age,4个属性组成,其学号属性惟一,学号、姓名字段不能为空。下列语句正确的是
A.CREATE TABLE student (sno char(5)NOT NULL sname char(8)NOT NULL sex char age int);
B.CREATE TABLE student (sno char(5)NOT NULL UNIQUE sname char(8) sex char age int);
C.CREATE TABLE (sno char(5)NOT NULL UNIQUE sname char(8)NOT NULL sex char age int);
D.CREATE TABLE student (sno char(5)NOT NULL UNIQUE sname char(8)NOT NULL sex char age int);
第5题:
Table TAB1 was created using the following statement: CREATE TABLE tab1 (c1 INT, c2 INT, c3 INT, c4 INT, c5 INT); If column C1 is unique and queries typically access columns C1, C2 and C3 together, which statement(s) will createindex(es) that will provide optimal query performance?()
第6题:
Given the following DDL for the PARTS table:CREATE TABLE parts (part_no INT(9) NOT NULL, part_name VARCHAR(24), part_remain INT(9));All part numbers entered will be different and all rows should be displayed in order of increasing part numbers whenever the table is queried. Which of the following create index statements will meet this criteria and require the least amount of storage for the index object?()
第7题:
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?()
第8题:
Which two operations can be performed on an external table()
第9题:
INSERT INTO tab1 SELECT cx, cy FROM tab2
INSERT INTO tab1 VALUES (tab2.cx, tab2.cy)
INSERT INTO tab1 VALUES (SELECT cx, cy FROM tab2)
INSERT INTO tab1 (c1, c2) VALUES (SELECT cx, cy FROM tab2)
第10题:
CREATE UNIQUE INDEX xtab1 ON tab1 (c1); CREATE INDEX xtab2 ON tab1 (c2) INCLUDE (c3)
CREATE UNIQUE INDEX xtab1 ON tab1 (c1) INCLUDE (c2, c3)
CREATE UNIQUE INDEX xtab1 ON tab1 (c3, c2, c1)
CREATE UNIQUE INDEX xtab1 ON tab1 (c2) INCLUDE (c1, c3)
第11题:
3
2
1
0
第12题:
ALTER TABLE T ADD COLUMN c1 int
ALTER TABLE T ADD (c1 int)
ALTER TABLE T ADD COLUMN c1
ALTER TABLE T ADD c1
第13题:
建立一个学生信息表student,要求它由学号sno、姓名sname、性别sex、年龄age4个属性组成,其学号属性唯一,学号、姓名字段不能为空。下列语句正确的是
A.CREATE TABLE student(sno char(5) NOT NULL sname char(8) NOT NULL sex char(1) age int);
B.CREATE TABLE student (sno char(5) NOT NULL UNIQUE sname char(8) sex char(1) age int);
C.CREATE TABLE (sno char(5) NOT NULL UNIQUE sname char(8) NOT NULL sex char(1) age int);
D.CREATE TABLE student (sno char(5) NOT NULL UNIQUE sname char(8) NOT NULL sex char(1) age int);
第14题:
Given the following statements:CREATE TABLE tab1 (col1 INT); CREATE TABLE tab2 (col1 INT); CREATE TRIGGER trig1 AFTER UPDATE ON tab1 REFERENCING NEW AS new1 FOR EACH ROW MODE DB2SQL INSERT INTO tab2 VALUES(new1.col1); INSERT INTO tab1 VALUES(2),(3);What is the result of the following query? SELECT count(*) FROM tab2;()
A.3
B.2
C.1
D.0
第15题:
TableTAB1wascreatedusingthefollowingstatement:CREATETABLEtab1(c1INT,c2INT,c3INT,c4INT,c5INT);IfcolumnC1isuniqueandqueriestypicallyaccesscolumnsC1andC2together,whichstatement(s)willcreateindex(es)thatwillprovideoptimalqueryperformance?()
A.CREATEUNIQUEINDEXxtab1ONtab1(c1)include(c2)
B.CREATEUNIQUEINDEXxtab1ONtab1(c1);CREATEINDEXxtab2ONtab1(c3)INCLUDE(c2)
C.CREATEUNIQUEINDEXxtab1ONtab1(c2,c1)
D.CREATEUNIQUEINDEXxtab1ONtab1(c2)INCLUDE(c1)
第16题:
设有表T,现要在该表新增加一个列,列名为:c1,类型为int。下列能实现该功能的语句是()。
AALTER TABLE T ADD COLUMN c1 int
BALTER TABLE T ADD (c1 int)
CALTER TABLE T ADD COLUMN c1
DALTER TABLE T ADD c1
第17题:
Table TAB1 was created using the following statement: CREATE TABLE tab1 (c1 INT, c2 INT, c3 INT, c4 INT, c5 INT); If column C1 is unique and queries typically access columns C1 and C2 together, which statement(s) will create index(es) that will provide optimal query performance? ()
第18题:
Given the following statements: CREATE TABLE tab1 (col1 INT); CREATE TABLE tab2 (col1 INT); CREATE TRIGGER trig1 AFTER UPDATE ON tab1 REFERENCING NEW AS new1 FOR EACH ROW MODE DB2SQL INSERT INTO tab2 VALUES(new1.col1); INSERT INTO tab1 VALUES(2),(3); What is the result of the following query? SELECT count(*) FROM tab2;()
第19题:
Evaluate the CREATE TABLE statement: CREATE TABLE products (product_id NUMBER (6) CONSTRAINT prod_id_pk PRIMARY KEY, product_name VARCHAR2 (15)); Which statement is true regarding the PROD_ID_PK constraint?()
第20题:
Which two operations can be performed on an external table()
第21题:
CREATE UNIQUE INDEX idx_partno ON parts(part_no)
CREATE UNIQUE INDEX idx_partno ON parts(part_name ASC)
CREATE UNIQUE INDEX idx_partno ON parts(part_name, part_no ASC)
CREATE UNIQUE INDEX idx_partno ON parts(part_no, part_name ASC)
第22题:
The PRIMARY KEY is created along with a new index.
The PRIMARY KEY is created and it would use an existing unique index.
The PRIMARY KEY would be created in a disabled state because it is using an existing index.
The statement produces an error because the USING clause is permitted only in the CREATE TABLE command.
第23题:
CREATE UNIQUE INDEX xtab1 ON tab1 (c1) include (c2)
CREATE UNIQUE INDEX xtab1 ON tab1 (c1); CREATE INDEX xtab2 ON tab1 (c3) INCLUDE (c2)
CREATE UNIQUE INDEX xtab1 ON tab1 (c2, c1)
CREATE UNIQUE INDEX xtab1 ON tab1 (c2) INCLUDE (c1)
第24题:
SELECT * FROM tab1 INNER JOIN tab2 ON c1=cx
SELECT * FROM tab1 LEFT OUTER JOIN tab2 ON c1=cx
SELECT * FROM tab1 FULL OUTER JOIN tab2 ON c1=cx
SELECT * FROM tab1 RIGHT OUTER JOIN tab2 ON c1=cx