单选题The following triggers were defined for table TAB1 in the order shown:CREATE TRIGGER trig_a AFTER UPDATE ON tab1 FOR EACH ROW UPDATE sale_tab SET sale_date = CURRENT DATE; CREATE TRIGGER trig_b AFTER UPDATE ON tab1 FOR EACH STATEMENT UPDATE invoice_tab

题目
单选题
The following triggers were defined for table TAB1 in the order shown:CREATE TRIGGER trig_a AFTER UPDATE ON tab1 FOR EACH ROW UPDATE sale_tab SET sale_date = CURRENT DATE; CREATE TRIGGER trig_b AFTER UPDATE ON tab1 FOR EACH STATEMENT UPDATE invoice_tab SET invoice_date = CURRENT DATE; CREATE TRIGGER trig_c AFTER UPDATE ON tab1 FOR EACH ROW UPDATE shipping_tab SET ship_date = CURRENT DATE; CREATE TRIGGER trig_d AFTER UPDATE ON tab1 FOR EACH STATEMENT UPDATE billing_tab SETbilling_date = CURRENT DATE;If an event occurs that causes all of them to activate, which trigger will be activated first?()
A

TRIG_A

B

TRIG_B

C

TRIG_C

D

TRIG_D

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

第1题:

Which of the following can be used to ensure that once a row has been inserted in table TABLEX, the column MAINID in that row cannot be updated?()

A.Define the column MAINID as NOT UPDATABLE

B.Define the column MAINID as a PRIMARY KEY

C.Define the column MAINID as a FOREIGN KEY

D.Define an UPDATE trigger on table TABLEX


参考答案:D

第2题:

Exhibit:

UPDATE EzonexamConsolidated

SET District = ‘Mexico’

WHERE RtvID = 45

You work as database administrator at Ezonexam.com. You handle one SQL Server 2000 computer and one database.

When users run the query in the exhibit above the receive the following error message:

Server: Mrh3612, Level 16, Stats 1, Line 1

View or function ‘EzonexamConsolidated’ is not updateable because it

contains aggregates:

How should you enable the query to run?

A.Create a non-normalized EzonexamConsolidated table and populate the table with data from the base tables.

B.The appropriate users should be granted UPDATE permissions on each base table.

C.To enable updates on the composite tables create an INSTEAD OF trigger on the view.

D.On each base table add a cascading update trigger.


正确答案:C
解析:Explanation:SQLServer2000usesINSTEADOFtriggersandpartitionedviewstoenhancetheclassofupdateableviews.INSTEADOFtriggerscanbecreatedonaviewinordertomakeaviewupdateable.TheINSTEADOFtriggerisexecutedinsteadofthedatamodificationstatementonwhichthetriggerisdefined.Thistriggerallowstheusertospecifythesetofactionsthatneedtotakeplaceinordertoprocessthedatamodificationstatement.Thus,ifanINSTEADOFtriggerexistsforaviewonagivendatamodificationstatement,thecorrespondingviewisupdateablethroughthatstatement.Iftheviewisapartitionedview,theviewisupdateable,subjecttocertainrestrictions.IncorrectAnswers:A:Creatingatablethatcombinesthecompositetablesthattheviewisbasedonwoulddenyustheabilitytousetheviewtoreturnaggregatedcolumnvalues.B:Theerrormessageisnotrelatedtopermissionsbuttotheupdateableofthetable.D:CascadingreferentialintegrityconstraintsmakesitpossibletodefinetheactionsSQLServer2000takeswhenauserattemptstodeleteorupdateakeytowhichexistingforeignkeyspoint.CascadingreferentialintegrityconstraintsfireAFTERtriggersafterallofthecascadingreferentialactionsdirectlycausedbytheoriginalDELETEorUPDATEareperformed.

第3题:

A user needs to create a trigger that will update table T2 whenever a row is added to table T1. Assuming the user has all appropriate privileges for table T2, which privilege is required on table T1 to create the trigger?()

A.REFERENCES

B.SELECT

C.UPDATE

D.ALTER


参考答案:D

第4题:

A technician has just finished installing a new server into a server rack. Which of the following should the technician do NEXT to complete the installation documentation?()

  • A、Update drivers, update operating system (e.g. Windows Update), create server baseline, createa new network diagram, update change management procedures
  • B、Create server baseline, label server, store vendor-specific documentation, update networkdiagrams, update asset tracking information
  • C、Create server baseline, assign server roles, install tape drive, delete network diagram, labelserver, update operating system (e.g. Windows Update)
  • D、Install applications on server, install external drives, toss vendor-specific documentation,update network diagrams

正确答案:B

第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?()

  • A、CREATE UNIQUE INDEX xtab1 ON tab1 (c1); CREATE INDEX xtab2 ON tab1 (c2) INCLUDE (c3)  
  • B、CREATE UNIQUE INDEX xtab1 ON tab1 (c1) INCLUDE (c2, c3) 
  • C、CREATE UNIQUE INDEX xtab1 ON tab1 (c3, c2, c1)  
  • D、CREATE UNIQUE INDEX xtab1 ON tab1 (c2) INCLUDE (c1, c3)

正确答案:B

第6题:

The following triggers were defined for table TAB1 in the order shown:CREATE TRIGGER trig_a AFTER UPDATE ON tab1 FOR EACH ROW UPDATE sale_tab SET sale_date = CURRENT DATE; CREATE TRIGGER trig_b AFTER UPDATE ON tab1 FOR EACH STATEMENT UPDATE invoice_tab SET invoice_date = CURRENT DATE; CREATE TRIGGER trig_c AFTER UPDATE ON tab1 FOR EACH ROW UPDATE shipping_tab SET ship_date = CURRENT DATE; CREATE TRIGGER trig_d AFTER UPDATE ON tab1 FOR EACH STATEMENT UPDATE billing_tab SETbilling_date = CURRENT DATE;If an event occurs that causes all of them to activate, which trigger will be activated first?()

A.TRIG_A

B.TRIG_B

C.TRIG_C

D.TRIG_D


参考答案:A

第7题:

你定义了一个对象类型myOBJ,要基于该类型来创建表tab1,语句为()。

A.CREATE TABLE tab1 OF myOBJ

B.CREATE TABLE myOBJ OF tab1

C.CREATE TABLE tab1 AS myOBJ

D.CREATE TABLE tab1 TYPE OF myOBJ


参考答案:C

第8题:

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


参考答案:D

第9题:

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? ()

  • A、 CREATE UNIQUE INDEX xtab1 ON tab1 (c1) include (c2)
  • B、 CREATE UNIQUE INDEX xtab1 ON tab1 (c1);  CREATE INDEX xtab2 ON tab1 (c3) INCLUDE (c2) 
  • C、 CREATE UNIQUE INDEX xtab1 ON tab1 (c2, c1)
  • D、 CREATE UNIQUE INDEX xtab1 ON tab1 (c2) INCLUDE (c1)

正确答案:A

第10题:

约束可以通过哪条命令创建()

  • A、SET TABLE
  • B、CREATE TABLE
  • C、USE TABLE
  • D、UPDATE TABLE

正确答案:B

更多相关问题