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)
第1题:
以下选项中不能正确把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 ;
第2题:
以下选项中不能正确把c1定义成结构体变量的是
A.typedef struct { int red; int green;; int blue; }COLOR; COLOR cl;
B.struct color cl { int red; int green; int blue; };
C.struet color { int red; int green; int blue; }c1;
D.struct { int red; int green; int blue; }cl;
第3题:
若有以下程序段: int c1=1,c2=2,c3: c3=c1/c2:
A.0
B.1/2
C.0.5
D.1
第4题:
以下选项中能正确把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;
第5题:
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)
第6题:
建立一个学生信息表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);
第7题:
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?()
第8题:
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?()
第9题:
Given the following two tables: TAB1 C1 C2 A 11 B 12 C 13 TAB2 CX CY A 21 C 22 D 23 The following results are desired: C1 C2 CX CY A 11 A 21 C 13 C 22 -- --D 23 Which of the following queries will yield the desired results?()
第10题:
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
第11题:
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)
第12题:
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
第13题:
若有以下程序段:int c1=1, c2=2,c3;c3=1.0/c2*c1;则执行后,c3中的值是______。
A.0
B.0.5
C.1
D.2
第14题:
下列程序段执行后,c3中的值是______。int c1=1,c2=2,c3;c3=1.0/c2*c1;
A.0
B.0.5
C.1
D.2
第15题:
请说出该程序段的功能。
declare @e numeric(5,2)
declare @ c1 int, @ c2 int, @ c3 int, @ c4 int
set @ c1=0; set @ c2 =0; set @ c3=0; set @ c4=0
declare xxx cursor
for select 成绩 from score
open xxx
fetch xxx into @ c
while @'@ fetch_status = 0
begin
if(@c > =90) set @cl =@ e1 +1;
else if( @ c > =70) set @ c2 =@ c2 +1;
else if(@ c> =60) set @ c3 =@ c3 +1;
else set @ c4 = @ c4 + 1
fetch from xxx into @ c
end
close xxx
deallocate xxx
print 优秀生人数:'+sb(@ c1,5);
print食好生人数:'+str(@ c2,5);
print及格生人数:'+str(@ c3,5);
print及格生人数:'+sh(@ c4,5)
第16题:
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
第17题:
若有程序段: int c1=1,c2=2,c3; c3=1.0/c2 * cl; 则执行后,c3中的值是 ( )
A.0
B.0.5
C.1
D.2
第18题:
设有表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
第19题:
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? ()
第20题:
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;()
第21题:
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)
第22题:
3
2
1
0
第23题:
ALTER TABLE T ADD COLUMN c1 int
ALTER TABLE T ADD (c1 int)
ALTER TABLE T ADD COLUMN c1
ALTER TABLE T ADD c1