CMS专题

单选题A programmer wants to generate values for a numeric ID column in their EXPENSE table. The ID column values need to be incremented by 1000 for each new expense report added to the EXPENSE table. Which DB2 object can be referenced by an INSERT statement

题目
单选题
A programmer wants to generate values for a numeric ID column in their EXPENSE table. The ID column values need to be incremented by 1000 for each new expense report added to the EXPENSE table. Which DB2 object can be referenced by an INSERT statement to meet thisrequirement?()
A

Sequence

B

Table Function

C

Identity Column

D

INSTEAD OF Trigger

如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

有如下关系:课程表C,主键为c-id (char (4))。

若用如下语句建立成绩表SC: CREATE TABLE SC(s-id char(6)NOT NULL,c-id char(4)NOT NULL,score Inteeer), 其中s-id为主键,c-id为外键(是C表的主键)。当执行如下语句肘,( )语句不能执行。

A.INSERT SC VALUES('990101','NULL',75)

B.INSERT SC VALUES('990203','C601',80)

C.INSERT SC VALUES(NULL,'C602',93)

D.INSERT SC VALUES('990202','C604',NULL)


正确答案:C

第2题:

A programmer wants to generate values for a numeric ID column in their EXPENSE table. The ID column values need to be incremented by 1000 for each new expense report added to the EXPENSE table. Which DB2 object can be referenced by an INSERT statement to meet thisrequirement?()

A.Sequence

B.Table Function

C.Identity Column

D.INSTEAD OF Trigger


参考答案:A

第3题:

Given two different character sets (A and B), which of the following must be true for A to be considered a strict superset of B?()

A. A must contain all of the characters defined in B

B. A must be Unicode

C. The encoded values in A must match the encoded values in B for all characters defined in B

D. A must be a multibyte character set

E. The encoded values in A must match the encoded values in B for all numeric and alphabetic characters in B


参考答案:A, C

第4题:

现有表book,字段:id(int),title(varchar),price(float);其中id字段设为标识,使用insert语句向book表中插入数据,以下语句错误的是()。

  • A、insert into book (id,title,price) values(1,'java',100)
  • B、insert into book (title,price) values('java',100)
  • C、insert into book values ('java',100) 这辆都不可以啊,如果不指定列需要明确的给出空值
  • D、insert book values('java',100)

正确答案:C,D

第5题:

Which values are NOT permitted to be part of the primary key?

A.alpha-numeric characters

B.punctuation

C.special characters

D.NULL


正确答案:D

第6题:

阅读下列说明,回答问题1至问题3。

【说明】

关于一位花商有以下一些事实。

(1)销售在不同地区生长的花,这些地区一年的最低气温在一定范围内变化。

(2)想用编号来表示发货类型。

(3)要出售某些类型的花。

假定已经通过SQL语句建立了基本表:

CREATE TABLE Zone(ID CHAR(2) PRIMARY KEY,

LowerTemp NUMERIC(3),

UpperTemp NUMERIC(3));

CREATE TABLE Delivery(ID CHAR (2) PRIMARY KEY,

Category CHAR(5),

DelSize NUMERIC(5,3));

CREATE TABLE FlowerInfo(ID CHAR (3),

ComName CHAR(25),

LatName CHAR(30),

Czone NUMERIC(3),

Hzone NUMERIC(3),

Delivered NUMERIC(3),

SunNeed CHAR(3),

PRIMARY KEY(ID));

地区(ID,最高温度,最低温度)

发货(ID,发货类型,发货规格)

花的信息(ID,普通名,拉丁名,花能够生长的最冷地区,花能够生长的最热地区,发货类型,日光需求)

写出SQL语句,将记录(ID,Category==pot,DelSize=1.5)插入Delivery表中。


正确答案:INSEllT INTO Delively(ID Category DelSize)VALLIES('1''pot'1.5)
INSEllT INTO Delively(ID, Category, DelSize)VALLIES('1','pot',1.5) 解析:插入记录用INSERT语句,其基本格式如下:
INSERT INTO基本表名(字段名[,字段名])
VALUES(常量[,常量]…)
据此易得对应的SQL语句为:
INSERT INTO Delivery(ID, Category, DelSize) VALUES('1','pot',1.5)

第7题:

有如下关系:课程表C,主键为c-id(char(4))。c-id c-name

若用如下语句建立成绩表SC: CREATE TABLE SC(s-id char(6)NOT NULL,c-id char(4)NOT NULL,score Integer),其中s-id为主键,c-id为外键(是C表的主键)。当执行如下语句时,哪个语句不能执行? ( )。

A.INSERT SC VALUES('990101','NULL',75)

B.INSERT SC VALUES('990203','C601',80)

C.INSERT SC VALUES(NULL,'C602',93)

D.INSERT SC VALUES('990202','C604',NULL)


正确答案:C

第8题:

Which two statements are true regarding the default behavior of the ORDER BY clause? ()

A.Null values are left out of the sort.

B.Character values are displayed from Z to A

C.Date values are displayed with the earliest value first.

D.Null values are displayed last for descending sequences.

E.Numeric values are displayed with the lowest values first.


参考答案:C, E

第9题:

Given two different character sets (A and B), which of the following must be true for A to be considered a strict superset of B?()

  • A、 A must contain all of the characters defined in B
  • B、 A must be Unicode
  • C、 The encoded values in A must match the encoded values in B for all characters defined in B 
  • D、 A must be a multibyte character set
  • E、 The encoded values in A must match the encoded values in B for all numeric and alphabetic character

正确答案:A,C

第10题:

The accounting manager wants you to create a form that when queried will display a calculated total of year-to-date actual expenditures for the found code entered. The values needed to generate this summary data are stored in multiple tables. Which data source type can you assign to the data block for this form without having the DBA create a database object?()

  • A、database table 
  • B、transactional trigger 
  • C、stored procedure 
  • D、FROM clause query 
  • E、client-side procedure

正确答案:D

更多相关问题