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题:
Examine the structure of the STUDENTS table: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.
B.
C.
D.
第2题:
以下选项中能正确把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;
第3题:
执行下列语句后,c3中的值为【 】
int c1=1,c2=2,c3;c3=1.0/c2 * c1;
第4题:
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)
第5题:
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
第6题:
若有以下程序段: int c1=1,c2=2,c3: c3=c1/c2:
A.0
B.1/2
C.0.5
D.1
第7题:
建立一个学生信息表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);
第8题:
以下选项中不能正确把c1定义成结构体变量的是
A.typedef struct {int red: int green: int blue; } COLOR; COLOR c1;
B.struct color c1 {int red int green: int blue; };
C.struct color {int red , int green : int blue : )cl;
D.struct {int red; int green; int blue } c1 ;
第9题:
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
第10题:
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)