Showing posts with label View in Sql Server 2008. Show all posts
Showing posts with label View in Sql Server 2008. Show all posts

15 June 2011

View in Sql Server 2008

View in Sql Server 2008

Creates a virtual table whose contents (columns and rows) are defined by a query. Use this statement to create a view of the data in one or more tables in the database.
For example, a view can be used for the following purposes:

-To focus, simplify, and customize the perception each user has of the database.

-As a security mechanism by allowing users to access data through the view, without granting the users permissions to directly access the underlying base tables.

-To provide a backward compatible interface to emulate a table whose schema has changed.

Example
--Partitioned view as defined on Server1
CREATE VIEW Customers
AS
--Select from local member table.
SELECT *
FROM CompanyData.dbo.Customers_33
UNION ALL
--Select from member table on Server2.
SELECT *
FROM Server2.CompanyData.dbo.Customers_66
UNION ALL
--Select from mmeber table on Server3.
SELECT *
FROM Server3.CompanyData.dbo.Customers_99

Consistency level in Azure cosmos db

 Consistency level in Azure cosmos db Azure Cosmos DB offers five well-defined consistency levels to provide developers with the flexibility...