1. Trang chủ
  2. » Tất cả

Slide3

23 233 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Nội dung

Session 3Implementing and Managing Views ReviewIntroduction to IndexesIndex ArchitectureRetrieving Stored DataFinding RowsVarious Types of IndexesWorking with IndexesViewing Index Information Session ObjectivesIntroduction to ViewsDefining ViewsExploring CREATE VIEW optionsModifying data through Views Introduction to ViewsA view is a virtual table that is made up of selected columns from one ore more tables.A view can include columns from other viewThe data inside the view comes from the base tables that are referenced in the view definition Type of ViewsStandard View: using columns from one or more tablesIndexed View: with a unique clustered indexPartitioned View: a view created using horizontally partitioned data from one or more tables Advantages of viewsSecurity through Personal AccessCustomized Display of DataMerger of Data from Multiple Tables or ViewsOperations on RecordsIntegrity Constraint Checks System ViewsTypes of System Views: Catalog Views Information Schema Views Compatibility Views Replication Views Dynamic Management Views Notification Services Views Creating ViewsSyntax:CREATE VIEW <view_name>AS <select_statement>Sample:CREATE VIEW Salary_Details ASSELECT EmpID, FirstName, LastName, Salary FROM Employee_Details Creating ViewsPermisions to create views:Sysadmin roleDb_ownerDb_ddladminCreate view permisionSelect permission on all tables Alter ViewsA view can be altered by dropping and recreating it or using Alter viewSyntax:ALTER VIEW <view_name>AS <select statement>Sample:ALTER VIEW Salary_Details AS SELECT * FROM Employee_Details WHERE EmpID=1 123doc.vn

Ngày đăng: 12/01/2013, 15:42

Xem thêm

TÀI LIỆU CÙNG NGƯỜI DÙNG

  • Đang cập nhật ...

TÀI LIỆU LIÊN QUAN