首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
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
28
问题
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
微软认证
相关试题推荐
Evenbeforetheopeningceremony,arecordhadbeenbrokenatSochi:12newevents,themostforanyOlympics,werescheduledto
School-agechildrenshouldparticipatein60minutesormoreofmoderatetovigorousphysicalactivitydaily,accordingtoanex
Itishardtomakemoneypeddlingsocialmediaanywhere.Duringtheirfirstfewyearsinbusiness,FacebookandTwitterlostpo
[A]"Ijustdon’tknowhowtomotivatethemtodoabetterjob.We’reinabudgetcrunchandIhaveabsolutelynofinancialrewa
Directions:Inthissection,youareaskedtowriteanessaybasedonthefollowinginformation.Makecommentsandexpressy
Herearesomemanagementtoolsthatcanbeusedtohelpyouleadapurposefullife.1.UseYourResourcesWisely.Yourdecisi
Itstartedsmall.Justapoliticalslogan,pastedontoaposterinabackofficesomewhere;NOEUROin1999.Germany’smainoppo
Itstartedsmall.Justapoliticalslogan,pastedontoaposterinabackofficesomewhere;NOEUROin1999.Germany’smainoppo
TheU.S.PostalService(USPS)continuestobleedredink.Itreportedanetlossof$5.6billionforfiscal2016,the10thst
TheU.S.PostalService(USPS)continuestobleedredink.Itreportedanetlossof$5.6billionforfiscal2016,the10thst
随机试题
某公司欲建一办公大楼,楼址选在一居民楼的前面,该居民楼的几十户居民认为该办公大楼建成以后势必合影响其正常的通风与采光,遂请求有关部门不要批准该公司的建房申请。但有关部门认为根据现有的政策规定,该建设项目没有不妥,遂批准了该公司的申请,并颁发了相关许可证。据
下列哪种情况使血液黏度增高
GTV确定后可能有几个CTV
A.便血量多而鲜红B.便血少而疼痛C.便血污秽而腥臭D.便血量多而色黑E.便污血而疼痛肛裂
下列属于外观设计的有( )。
老张为了试验某品牌化肥的效果,把自家的稻田分成东边、西边两块,在东边地块施肥,西边地块不施肥。水稻收割后.东边地块亩产700公斤,西边地块亩产400公斤。因此,该品牌化肥能有效增产。以下最能反驳上述论证的是:
给定资料1.宇宙只有一个地球,人类共有一个家园。地球是人类唯一赖以生存的家园,珍爱和呵护地球是人类的唯一选择。“生态兴则文明兴,生态衰则文明衰。”古今中外,人与自然和谐的关系印证着良好的生态环境对人类社会生存发展的影响。改革开放以来,中
元代对边疆地区的统治方式不同于其他三地的一地是()。
甲创作了新编《雷雨》剧本,由人艺演出,乙公司想获得网络独家播放权。对此,下列说法不正确的是()
下列说法正确的是().
最新回复
(
0
)