网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

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


参考答案

更多 “ 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.3B.2C.1D.0 ” 相关考题
考题 你正在SQLSERVER2005服务器上一个名为DB1的数据库上进行着工作。你发现由于对DB1中Table1表的扫描导致了查询执行缓慢。已知,Table是一个使用频繁而且非常巨大的表,同时你又确定了查询中包含如下的语句:SELECTcol1,col2FROMtable1WHEREcol3=。在表保持对所有用户有效的情况下,为了最大化的提高查询性能,你应该怎么做?() A.更新DB1数据库中表Table1的所有统计信息B.在DB1数据库中,使用CREATESTATISTICS语句为表Table1的列col3创建缺少的统计信息C.设置优先值提升选项的值为1D.执行如下语句:USEDB1GOCREATEINDEXindex1ONtable1(col3)INCLUDE(col1,col2)WITH(ONLINE=ON)GOE.执行如下语句USEDB1GOCREATEINDEXindex1ONtable1(col3,col2,col1)

考题 The following statements:CREATE TABLE t1 (col1 INT NOT NULL, PRIMARY KEY(col1)); CREATE TABLE t2 (col1 INT NOT NULL, col2 CHAR(1) NOT NULL, PRIMARY KEY (col1, col2), FOREIGN KEY (col1) REFERENCES t1 (col1) ON DELETE CASCADE ON UPDATE RESTRICT); CREATE TABLE t3 (col1 INT NOT NULL, col2 INT NOT NULL, PRIMARY KEY (col1, col2),FOREIGN KEY (col1) REFERENCES t1 (col1) ON DELETE NO ACTION ON UPDATE RESTRICT);INSERT INTO t1 VALUES (1), (2); INSERT INTO t2 VALUES (1, ‘a‘), (1, ‘b‘), (2,‘c‘); INSERT INTO t3 VALUES (1, 100), (2, 200), (2,300);How many rows will be deleted by the following DELETE statement? DELETE FROM t1 WHERE col1= 1;()A.4B.3C.1D.0

考题 YouworkwithadatabasenamedDB1,whichislocatedonaSQLServer2005computer.YoudiscoverthatatablescanonTable1inDB1causesaslowquery.Table1isaverylargetablethatisusedfrequently.Youascertainthatthequerycontainsthefollowingstatement.SELECTcol1,col2FROMtable1WHEREcol3=Youneedtoprovidemaximumqueryperformance.Table1mustremainavailabletousers.Whatshouldyoudo?()A.UpdateallstatisticsonTable1inDB1.B.UsetheCREATESTATISTICSstatementinDB1tocreatemissingstatisticsoncol3ofTable1.C.Setthepriorityboostserveroptionto1.D.Executethefollowingstatement.USEDB1GOCREATEINDEXindex1ONtable1(col3)INCLUDE(col1,col2)WITH(ONLINE=ON)GO

考题 下列四组SQL命令,全部属于数据定义语句的命令是()A.CREATE,DROP,UPDATEB.CREATE,DROP,ALTERC.CREATE,DROP,GRANTD.CREATE,DROP,SELECT

考题 下列哪组SQL命令全部属于数据定义语句的命令?()A.CREATE,DROP,ALTERB.CREATE,DROP,SELECTC.CREATE,DROP,GRANTD.CREATE,DROP,UPDATE

考题 对于表A(col1 int,col2 char(1))使用聚合函数sum,下面语句正确的是()A.select sum(col2) as col2 from A group by col1B.select sum(col1) as col1 from A group by col2C.select sum(col1) as col1,col2 from A group by col1D.select sum(col2) as col1 from A group by col2

考题 对于表A(col1 int,col2 char(1))更新col1=1的数据col2值为N,下面语句正确的是()A.update table A set col2=’N’ where col1=1B.modify table A set col2=N where col1=1C.update A set col2=’N’ where col1=1D.modify A set col2=N where col1=1

考题 【单选题】对于建立在数据库上的DDL触发器,常用的激活DDL触发器的事件不包括()A.Create_Table,Alter_Table,Drop_TableB.Create_View,Alter_View,Drop_ViewC.Create_Procedure,Alter_Procedure,Drop_ProcedureD.Rollback

考题 在C++语言中,在某些应用时,经常会碰到需要用到二维数组的情况。现在有如下应用要求,要求分别创建一个int类型二维数组的构造函数,以及一个int类型二维数组的释放函数,其函数的定义如下,请你实现他们。 int ** create2DArray(int d1, int d2); void destory2DArray(int ** array);

考题 如果要让某个用户能够在所有模式下建表应该授予此用户哪个权限?A.create tableB.create any tableC.create all tableD.create * table