A user needs to create a trigger that will update table T2 w

题目
单选题
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
解析: 暂无解析
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

“把查询SC表和更新SC表的9rade列的权限授予用户user”的正确SQL语句是( )。

A)GRANT.SELECT sc, UPDATE sc.grade TO user

B)GRANT SELECT, UPDATE (grade) ON TABLE sc TO user

C)GRANT SELECT, UPDATE ON TABLE sc.grade TO user

D)GRANT SELECT ON TABLE sc, UPDATE ON TABLE sc(grade) TO user


正确答案:B
GRANT语句的一般格式为:

A、C、D选项语法错误,所以B选项是正确的。

第2题:

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

第3题:

( 35 ) “ 把查询 sc 表和更新 sc 表的 grade 列的权限授予用户 user1 ” 的正确 SQL 语句是

A ) GRANT SELECT , UPDATE ( grade ) ON TABLE sc TO user1

B ) GRANT SELECT sc , UPDATE sc . grade TO user1

C ) GRANT SELECT , UPDATE ON TABLE sc . grade TO user1

D ) GRANT SELECT ON TABLE sc , UPDATE ON TABLE sc(grade) TO user1


正确答案:A

第4题:

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

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

正确答案:B

第5题:

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

第6题:

You are the DBA for an academic database. You need to create a role that allows a group of users to modify existing rows in the STUDENT_GRADES table. Which set of statements accomplishes this? ()

A. CREATE ROLL registrar; GRANT MODIFY ON student_grant TO registrar; GRANT registrar to user 1, user2, user3

B. CREATE NEW ROLE registrar; GRANT ALL ON student_grant TO registrar; GRANT registrar to user 1, user2, user3

C. CREATE ROLL registrar; GRANT UPDATE ON student_grant TO registrar; GRANT ROLE to user1, user2, user3

D. CREATE ROLL registrar; GRANT UPDATE ON student_grant TO registrar; GRANT registrar to user 1, user2, user3;

E. CREATE registrar; GRANT CHANGE ON student_grant TO registrar; GRANT registrar;


参考答案:D

第7题:

A user utilizing an alias to update a subset of columns in a table must have UPDATE privileges on which of the following DB2 objects?()

A.Table

B.Columns

C.Table and Alias

D.Columns and Alias


参考答案:A

第8题:

实现“取消用户USER4对学生表STUD中学号(XH)的修改权限”这一功能的SQL语句是( )。

A.REVOKE UPDATE (XH) ON TABLE FROM USER4;

B.REVOKE UPDATE (XH) ON TABLE STUD FROM PUBLIC ;

C.REVOKE UPDATE (XH) ON TABLE STUD FROM USER4;

D.REVOKE ALL PRIVILEGES ON TABLE STUD FROM USER4;


正确答案:C
解析:在SQL中取消用户对数据的权限的命令是REVOKE UPDATE ()。本题中括号内的参数应该是XH,取消的用户是USER4,取消的操作权限是STUD,位置是在TABLE表上。所以全部正确的就是C选项。

第9题:

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.

第10题:

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

更多相关问题