TAILIEUCHUNG - Microsoft SQL Server 2008 R2 Unleashed- P92

Microsoft SQL Server 2008 R2 Unleashed- P92:SQL Server 2005 provided a number of significant new features and enhancements over what was available in SQL Server 2000. This is not too surprising considering there was a five-year gap between these major SQL Server 2008 is not as much of a quantum leap forward from SQL Server 2005 | 854 CHAPTER 27 Creating and Managing Views in SQL Server FROM UPDATE vw_CreditCard SET ExpYear ExpYear 1 WHERE ExpYear 2006 In general updatable views are similar to the previous example. The following specific conditions allow a view to be updatable Any data modification via a view must reference columns from a single base table. This does not restrict a view to only one table but the columns referenced in the data modification can be for only one of the tables defined in the view. The columns affected by the data modification must directly reference the underlying tables. They cannot be derived through an aggregate function for example AVG COUNT SUM and cannot contain computations from an expression that utilizes columns from another table. The TOP clause cannot be part of the SELECT statement that defines the view when the WITH CHECK OPTION clause is used. The columns affected by the data modification cannot be affected by GROUP BY HAVING or DISTINCT clauses in the view definition. You can overcome these restrictions by using INSTEAD OF triggers to perform the data modifications. You can create INSTEAD OF triggers on a view and the logic within the triggers performs the actual database updates. INSTEAD OF triggers are discussed in detail in Chapter 30 Creating and Managing Triggers. Partitioned views are another means for performing data modifications via a view. Partitioned views can be updatable and are not subject to all the restrictions listed for conventional views. However some additional restrictions apply to partitioned views. These additional restrictions and other details about partitioned views are discussed in the next section. Partitioned Views Partitioned views are used to access data that has been horizontally split or partitioned across multiple tables. These tables can be in the same or different databases or even spread across multiple servers. Partitioning of tables is done to spread the I O and processing load of large tables

TỪ KHÓA LIÊN QUAN
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.