Views for Beginners

Sakthi.Singaravel
Posted by Sakthi.Singaravel under Sql Server category on | Points: 40 | Views : 1085
Views for Beginners

First we need to know definition of view,
A view is a virtual table that consists of columns from one or more tables.

Syntax:
¯¯¯¯¯¯¯

CREATE VIEW view_name [(column_name[,column_name]..)]
[WITH ENCRYPTION]
AS select_statement [WITH CHECK OPTION]


Example:
¯¯¯¯¯¯¯¯
CREATE VIEW vwCustomer
AS SELECT CustomerId, Company Name, Phone
FROM Customers


Dropping Views:
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

DROP VIEW view_name

Comments or Responses

Posted by: Hariinakoti on: 4/11/2012 Level:Starter | Status: [Member] | Points: 10
Thanq Singaravel
Posted by: Akiii on: 6/2/2012 Level:Bronze | Status: [Member] | Points: 10
How can we decrypt the view as you are encrypting it ?


Thanks and Regards
Akiii

Login to post response