首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
You are the administrator of a SQL Server 2000 computer. The server contains a database named sales. Your company uses the datab
You are the administrator of a SQL Server 2000 computer. The server contains a database named sales. Your company uses the datab
admin
2009-05-19
23
问题
You are the administrator of a SQL Server 2000 computer. The server contains a database named sales. Your company uses the database to store the sales department’s responses to requests for price quotations. The database is configured as shown in the exhibit.
Developers in your company create an application used for saving quotations. The application executes the following transact-SQL statement:
UPDATE QuotationSummary
SET CustomerName = ‘Jean-Paul Deloria’
WHERE QuotationID = 12
When the application executes the statement, the developers receive the following error:
Server: Mrh4403, Level 16, Stats 1, Line 1
View or function ‘QuotationSummary’ is not updateable because it contains aggregates:
You want developers to be able to use this UPDATE statement without generating errors. What should you do?
选项
A、Create an INSTEAD OF trigger on the view to update the composite tables.
B、Grant the developers UPDATE permissions on each base table.
C、Add a cascading update trigger on each base table.
D、Create a QuotationSummary table and populate the table with data from the base tables.
答案
A
解析
Explanation: SQL Server 2000 uses INSTEAD OF triggers and partitioned views to enhance the class of updateable views. INSTEAD OF triggers can be created on a view in order to make a view updateable. The INSTEAD OF trigger is executed instead of the data modification statement on which the trigger is defined. This trigger allows the user to specify the set of actions that need to take place in order to process the data modification statement. Thus, if an INSTEAD OF trigger exists for a view on a given data modification statement, the corresponding view is updateable through that statement. If the view is a partitioned view, the view is updateable, subject to certain restrictions.
Incorrect Answers:
B: Before a user can use a database; they must be given certain permissions that are determined by the type of activity they will be permitted on the database. To run UPDATE statements against a database the user must be granted UPDATE permissions. This can be specified at the table or database level. In this scenario, granting the permission at the database level would require less administrative effort. However, the error message is not related to permissions but to the updateability of the table.
C: Cascading referential integrity constraints makes it possible to define the actions SQL Server 2000 takes when a user attempts to delete or update a key to which existing foreign keys point. Cascading referential integrity constraints fire AFTER triggers after all of the cascading referential actions directly caused by the original DELETE or UPDATE are performed.
D: Creating a table that combines the composite tables that the view is based on would deny us the ability to use the view to return aggregated column values.
转载请注明原文地址:https://kaotiyun.com/show/huhZ777K
本试题收录于:
微软70228题库微软认证分类
0
微软70228
微软认证
相关试题推荐
Severaltypesoffinancialriskareencounteredininternationalmarketing;themajorproblemsincludecommercial,political,an
Ofallthegoodsandservicestradedinthemarketeconomy,pharmaceuticalsareperhapsthemostcontentious.Thoughproducedby
CigarettesmokingisahealthhazardofsufficientimportanceintheUnitedStatestowarrantappropriateremedialaction.Itwa
Thenewaircraftrepresentsa$250mbetbyBombardierthatMexicocouldprovidenotjustroutinelabourbutmanufacturingthat
Fewthingssay"forgetI’mhere"quitesoeloquentlyastheposeoftheshy—theavertedgaze,thehunchedshoulders,thebodypi
Asthemini-blogisbecomingincreasinglypopularamongnetizens,italsobecomescommontocreaterumors.Youaresupposedtow
Self-recommendationWriteane-mailofabout100wordsbasedonthefollowingsituation:Youwanttoapplyforapart-ti
Evenintraditionaloffices,"thelinguafrancaofcorporateAmericahasgottenmuchmoreemotionalandmuchmoreright-brained
Notlongago,chiefexecutiveofficers(CEOS)werelandedasheroes,leadersofthebraveneweconomy.BillGatesandJackWelchw
通过【网上邻居】查找网上计算机和共享文件资源,IP为“202.204.54.23”,主机名为administrator,共享文件夹名为“tools”。
随机试题
()是我国已发现的古代文字中时代最早、体系较为完整的文字。
胸段脊髓受损在脊休克过去之后,排尿功能障碍的表现为
男性,63岁。吸烟病史多年。近两周来出现走路后左腿腓肠肌麻木,紧束疼痛感,休息片刻后缓解。继续走路后又出现上述症状。查体:血压150/80mmHg,心率80次/分,律齐。双肺无特殊。平卧位双下肢抬高60°,约30s后出现左下肢苍白,左足背动脉搏动消失。入院
A.短暂性脑缺血发作B.脑血栓形成C.脑栓塞D.脑出血E.蛛网膜下腔出血常在安静中起病的是
依据树脂的化学组成分类,属于油胶树脂的药材有()
患者,男性,28岁。自取木炭在屋内点燃取暖时,发生昏迷,急诊入院。诊断为急性一氧化碳中毒。护士向患者朋友解释其发病机制是
针对变更地籍测量,宗地变更可分为界址未发生变化的宗地变更、界址发生变化的宗地变更及()的变更三种情况。
大洪公司2014年与印花税有关的业务如下:(1)2月接受甲企业委托,加工产品,合同载明,原料由甲企业提供,价值50万元,收取加工费20万元。(2)7月与某租赁公司签订融资租赁合同,合同约定租赁费金额1000万元,分5年支付。
VLAN工作在OSI参考模型的层次是()。
陆地交通的形式,与其说取决于技术,不如说取决于政治、经济和环境方面的考虑。我们现在就可以建造更坚固、更安静、更防滑的道路,但却不建,因为费用太高。我们可以在高速公路两旁安装隔音板并且设计出尾气少、轮胎噪音低的卡车,从而使交通噪音减半,但我们不愿意掏这笔钱。
最新回复
(
0
)