单选题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


相似考题
更多“单选题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”相关问题
  • 第1题:

    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.

  • 第2题:

    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

  • 第3题:

    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

  • 第4题:

    Which of the following circumstances would automatically create a system restore point?()

    • A、installation of an unsigned driver
    • B、a system crash
    • C、installation of an application that uses Windows Installer or installation of Shield Pro version 6.0 or later
    • D、installing an update by using the Windows Update or Automatic Updates
    • E、each time the system is rebooted

    正确答案:A,D

  • 第5题:

    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

  • 第6题:

    你定义了一个对象类型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

  • 第7题:

    Which statement describes the effect on an index, when the indexed column for the rows is updatedin the base table()

    • A、An update in a leaf row takes place.
    • B、The index becomes invalid after the update.
    • C、The leaf block containing the row to be updated is marked as invalid.
    • D、A row in the leaf block of the index for the key value is logically deleted and a new leaf row is inserted

    正确答案:D

  • 第8题:

    You are responsible for managing the database schema for an order entry application in a SQL Server 2005 database. After a design review, a member of the development staff asks you to add a new column named CommissionRate to the Product table. Because the actual commission rates for all products are not known at this time, each product has a default commission rate of 12 percent. The rate can be modified as necessary. You add the new column. You need to configure the table to assign the default value as efficiently as possible. What should you do?()

    • A、 Create an INSERT trigger to assign the default value to each item in the table. 
    • B、 Create a CHECK constraint to validate the data and to assign the default value to each item in the table. 
    • C、 Create an UPDATE trigger to update the default value for each new item in the table. 
    • D、 Create a DEFAULT constraint to assign the default value specifying the WITH VALUES argument.

    正确答案: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, 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
    解析: 暂无解析

  • 第10题:

    单选题
    You are responsible for managing the database schema for an order entry application in a SQL Server 2005 database. After a design review, a member of the development staff asks you to add a new column named CommissionRate to the Product table. Because the actual commission rates for all products are not known at this time, each product has a default commission rate of 12 percent. The rate can be modified as necessary. You add the new column. You need to configure the table to assign the default value as efficiently as possible. What should you do?()
    A

    Create an INSERT trigger to assign the default value to each item in the table.

    B

    Create a CHECK constraint to validate the data and to assign the default value to each item in the table.

    C

    Create an UPDATE trigger to update the default value for each new item in the table.

    D

    Create a DEFAULT constraint to assign the default value specifying the WITH VALUES argument.


    正确答案: B
    解析: 暂无解析

  • 第11题:

    单选题
    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
    解析: 暂无解析

  • 第12题:

    单选题
    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)


    正确答案: C
    解析: 暂无解析

  • 第13题:

    你定义了一个对象类型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

  • 第14题:

    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

  • 第15题:

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

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

    正确答案:B

  • 第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

    正确答案:D

  • 第17题:

    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

  • 第18题:

    Which two operations can be performed on an external table()

    • A、Create a view on the table.
    • B、Create an index on the table.
    • C、Create a synonym on the table.
    • D、Add a virtual column to the table.
    • E、Update the table using the UPDATE statement.
    • F、Delete rows in the table using the DELETE command.

    正确答案:A,C

  • 第19题:

    Which two operations can be performed on an external table()

    • A、Create a view on the table.
    • B、Create an index on the table.
    • C、Create a synonym on the table.
    • D、Add a virtual column to the table.
    • E、Update the table using the UPDATE statement.
    • F、Delete rows in the table using the DELETE command

    正确答案:A,C

  • 第20题:

    单选题
    Which statement describes the effect on an index, when the indexed column for the rows is updatedin the base table()
    A

    An update in a leaf row takes place.

    B

    The index becomes invalid after the update.

    C

    The leaf block containing the row to be updated is marked as invalid.

    D

    A row in the leaf block of the index for the key value is logically deleted and a new leaf row is inserted


    正确答案: B
    解析: 暂无解析

  • 第21题:

    单选题
    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
    解析: 暂无解析

  • 第22题:

    单选题
    You are responsible for managing the database schema for an order entry application in a SQL Server 2005 database. After a design review, a member of the development staff asks you to add a new column named CommissionRate to the Product table. Because the actual commission rates for all products are not known at this time, each product has a default commission rate of 12 percent. The rate can be modified as necessary. You add the new column. You need to configure the table to assign the default value as efficiently as possible. What should you do?()
    A

     Create an INSERT trigger to assign the default value to each item in the table. 

    B

     Create a CHECK constraint to validate the data and to assign the default value to each item in the table. 

    C

     Create an UPDATE trigger to update the default value for each new item in the table. 

    D

     Create a DEFAULT constraint to assign the default value specifying the WITH VALUES argument.


    正确答案: D
    解析: 暂无解析

  • 第23题:

    单选题
    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


    正确答案: B
    解析: 暂无解析

  • 第24题:

    单选题
    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


    正确答案: B
    解析: 暂无解析