找考题网-背景图
单项选择题

你打算从SQL Server 2000数据库的客户表和国别表中导入客户数据到SQL Server 2005数据库中。你要确保在导入过程中,客户表中国家代码列的每个值在SQL Server 2005数据库中国别表内都有其相应的纪录。你在两个表之间定义一外键,这样,参照完整性将保证若国家代码值在客户表中存在,而在国别表中不存在时导入程序失败。你要确保国别表无记录时导入过程不失败,该怎么做?()

A.删除外键,用脚本导入数据,重新创建外键
B.创建一个CHECK约束
C.创建一个DML INSTEAD OF触发器,将错误记录写入文件或表中
D.创建一个DML AFTER触发器,将错误纪录写入文件或表中

热门试题

单项选择题You work with a SQL Server 2005 database that provides banking information for customers. You want customers to see banking reports that combine data that is retrieved from the database with real-time investment information that comes from a Web service provided by a third party. The investment information must be current when the reports are executed. You need to create the appropriate objects that support the reports. What should you do?()

A.Publish the data in the database as an XML Web service by using the FOR XML AUTO clause.
B.Create a table to store the banking information for each customer. Create a trigger that fires when data is inserted into the table that joins with the data coming from the Web service.
C.Create a Transact-SQL stored procedure that uses a temporary table to store the banking information for each customer. Update the table with the values from the Web service.
D.Have a developer in TestKing.com create an assembly that calls the remote Web service.Create a CLR function by using the assembly. Call the CLR function and combine the results with banking information in the database.