TAILIEUCHUNG - The Real MTCS SQL Server 2008 Exam 70/432 Prep Kit- P165

The Real MTCS SQL Server 2008 Exam 70/432 Prep Kit- P165: Congratulations on your journey to become certified in SQL Server 2008. This book will help prepare you for your exam and give you a practical view of working with SQL Server 2008. | Self Test Appendix Appendix 125 because it is impossible to insert a duplicate value into a column marked as PRIMARY KEY. 10. You have created a Customers table and an NZCustomers view using the following definitions. CREATE TABLE Customers CustomerID int IDENTITY PRIMARY KEY CompanyName varchar 50 Country varchar 50 Notes varchar max GO CREATE VIEW NZCustomers AS SELECT FROM Customers WHERE Country New Zealand GO CREATE TRIGGER Trig_NZCustomers ON INSTEAD OF INSERT AS BEGIN SELECT CustomerID FROM INSERTED END GO You notice that when you insert data into the NZCustomers view no error occurs but the data does not appear in the table. What is the cause of the problem A. The Trig_NZCustomers must be dropped because it is preventing the insert operation. B. The view cannot be updated because of the WHERE clause. Remove the WHERE clause from the view. C. The IDENTITY column is preventing new CustomerlDs from being generated. Redefine the column not to use the IDENTITY attribute. D. You must explicitly call COMMIT TRANSACTION within Trig_ NZCustomers. Correct Answer Explanation A. Answer A is correct because the Trig_NZCustomers is defined as INSTEAD OF and therefore is preventing the insert operation. Incorrect Answers Explanations B C D. Answer B is incorrect because as long as the view is based on a single table it is updateable regardless of the WHERE clause. Answer C is incorrect because the IDENTITY column does 126 Appendix Self Test Appendix not stop update operations in any way. Answer D is incorrect because the transaction within the trigger commits automatically. 11. You are adding a Notes column to a table named Customers. You are instructed that the Notes column must always contain a value even if the value is No notes available. Unfortunately many stored procedures you use to add data to the Customers table omit the Notes column and it is impractical to redesign the stored procedures. What is the easiest way to ensure that the Notes column in

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.