• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
MS SQLSERVER:Creating Views
 

MS SQLSERVER:Creating Views

on

  • 697 views

MS SQLSERVER:Creating Views

MS SQLSERVER:Creating Views

Statistics

Views

Total Views
697
Views on SlideShare
649
Embed Views
48

Actions

Likes
0
Downloads
0
Comments
0

6 Embeds 48

http://www.ustudy.in 35
http://ustudy.in 5
http://www.dataminingtools.net 4
http://www.slideshare.net 2
http://dataminingtools.net 1
http://localhost:3000 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    MS SQLSERVER:Creating Views MS SQLSERVER:Creating Views Presentation Transcript

    • 13
      SQL SERVER: CREATING VIEWS
    • What is a View
      A View is a query which is stored in a server in the form of an object. The Power of a view lies in the fact that it can be referenced as a table. It provides an abstraction of the underlying data.
      The Main use of using a view is the security that it offers. A Third-Person may be restricted to view only a portion of a database, while hiding the rest of sensitive data
      The Illustration is made in the next slide.
    • What is a View
      Remember that the view exists as query and not as a table
    • SQL Views
      Points to remember about SQL Views:
      • View is inherently a query.
      • Changes made in the view will not alter a table. An explicit update must be
      made to effect a change.
      • All changes can be made in the view except DDL commands
      • Views are used to provide additional security over data
      • It also prevents unwanted tampering of sensitive data
      • Views provide performance benefits
    • Creating Views
      The SQL syntax for creating a view is as follows:
      Create view <viewName>
      As
      …QUERY that results in a table/data…
      GO
      Example:
      Consider a student table:
      Create view NameList
      As
      Select regno,name from student
      go
      View
    • Using Views
      After creating a view, it can used as if it is a table. It can queried like a normal table:
      Select * from nameList
      The above query on the view will return:
      Thus, a view provides a good level of abstraction over the database.
    • Modifying Views
      An existing view is modified like using the alter view statement.
      The Syntax
      Alter view <viewName>
      As
      …QUERY that results in a table/data…
      GO
      Similar to the alter procedure statement, the alter table command redefines the existing view defenition.
    • Deleting Views
      The Syntax:
      Drop view <viewName>
      Example:
      Drop view nameList
    • Summary
      13. Creating Views
      • About Views
      • Creating Views
      • Modifying Views
      • Deleting Views
    • Visit more self help tutorials
      Pick a tutorial of your choice and browse through it at your own pace.
      The tutorials section is free, self-guiding and will not involve any additional support.
      Visit us at www.dataminingtools.net