SlideShare a Scribd company logo
13SQL SERVER: CREATING VIEWS
What is a ViewA 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 dataThe Illustration is made in the next slide.
What is a ViewRemember that the view exists as query and not as a table
SQL ViewsPoints 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 benefitsCreating ViewsThe SQL syntax for creating a view is as follows:Create view <viewName>As …QUERY that results in a table/data…GOExample:Consider a student table:Create view NameListAsSelect regno,name from studentgoView
Using ViewsAfter creating a view, it can used as if it is a table. It can queried like a normal table:Select * from nameListThe above query on the view will return:Thus, a view provides a good level of abstraction over the database.
Modifying ViewsAn existing view is modified like using the alter view statement.The SyntaxAlter view <viewName>As …QUERY that results in a table/data…GOSimilar to the alter procedure statement, the alter table command redefines the existing view defenition.

More Related Content

PPTX
MS Sql Server: Creating Views
PPT
Module05
PPT
SQL Views
PPTX
PPT
4 trigger
PPT
It203 class slides-unit5
PPT
Data mining
PDF
Crm course 2010
MS Sql Server: Creating Views
Module05
SQL Views
4 trigger
It203 class slides-unit5
Data mining
Crm course 2010

Viewers also liked (6)

PPTX
MS SQL SERVER: Creating Views
PPT
Air crew
PPT
HUMAN CAPITAL RESOURCE MANAGEMENT
PPTX
Cyber crime and secuity
PPTX
Cyber crime and security
PPTX
Cybercrime.ppt
MS SQL SERVER: Creating Views
Air crew
HUMAN CAPITAL RESOURCE MANAGEMENT
Cyber crime and secuity
Cyber crime and security
Cybercrime.ppt
Ad

Similar to MS SQLSERVER:Creating Views (20)

PPTX
Designing and Creating Views, Inline Functions, and Synonyms
PDF
Sql ch 13 - sql-views
PPTX
Sql server ___________session_16(views)
PPTX
Oracle Database View
PPT
Oracle view
PPTX
SQL lab number 10 in database system ppt
PPT
PDF
Sql views
PPTX
Database ppt[}}.pptx database system and
PDF
Sql viwes
PPT
PPT
PPTX
Lec 09 SQL - 3.pptx
PPTX
VIEWS.pptx
PPTX
Getting Started with MySQL II
Designing and Creating Views, Inline Functions, and Synonyms
Sql ch 13 - sql-views
Sql server ___________session_16(views)
Oracle Database View
Oracle view
SQL lab number 10 in database system ppt
Sql views
Database ppt[}}.pptx database system and
Sql viwes
Lec 09 SQL - 3.pptx
VIEWS.pptx
Getting Started with MySQL II
Ad

More from sqlserver content (20)

PPTX
MS SQL SERVER: Using the data mining tools
PPTX
MS SQL SERVER: SSIS and data mining
PPTX
MS SQL SERVER: Programming sql server data mining
PPTX
MS SQL SERVER: Olap cubes and data mining
PPTX
MS SQL SERVER: Microsoft time series algorithm
PPTX
MS SQL SERVER: Microsoft sequence clustering and association rules
PPTX
MS SQL SERVER: Neural network and logistic regression
PPTX
MS SQL SERVER: Microsoft naive bayes algorithm
PPTX
MS SQL SERVER: Decision trees algorithm
PPTX
MS SQL Server: Data mining concepts and dmx
PPTX
MS Sql Server: Reporting models
PPTX
MS Sql Server: Reporting manipulating data
PPTX
MS Sql Server: Reporting introduction
PPTX
MS Sql Server: Reporting basics
PPTX
MS Sql Server: Datamining Introduction
PPTX
MS Sql Server: Business Intelligence
PPTX
MS SQLSERVER:Feeding Data Into Database
PPTX
MS SQLSERVER:Doing Calculations With Functions
PPTX
MS SQLSERVER:Deleting A Database
PPTX
MS SQLSERVER:Customizing Your D Base Design
MS SQL SERVER: Using the data mining tools
MS SQL SERVER: SSIS and data mining
MS SQL SERVER: Programming sql server data mining
MS SQL SERVER: Olap cubes and data mining
MS SQL SERVER: Microsoft time series algorithm
MS SQL SERVER: Microsoft sequence clustering and association rules
MS SQL SERVER: Neural network and logistic regression
MS SQL SERVER: Microsoft naive bayes algorithm
MS SQL SERVER: Decision trees algorithm
MS SQL Server: Data mining concepts and dmx
MS Sql Server: Reporting models
MS Sql Server: Reporting manipulating data
MS Sql Server: Reporting introduction
MS Sql Server: Reporting basics
MS Sql Server: Datamining Introduction
MS Sql Server: Business Intelligence
MS SQLSERVER:Feeding Data Into Database
MS SQLSERVER:Doing Calculations With Functions
MS SQLSERVER:Deleting A Database
MS SQLSERVER:Customizing Your D Base Design

Recently uploaded (20)

PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
A Presentation on Artificial Intelligence
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Machine Learning_overview_presentation.pptx
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Cloud computing and distributed systems.
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
sap open course for s4hana steps from ECC to s4
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Spectroscopy.pptx food analysis technology
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
A comparative analysis of optical character recognition models for extracting...
Assigned Numbers - 2025 - Bluetooth® Document
A Presentation on Artificial Intelligence
Review of recent advances in non-invasive hemoglobin estimation
Machine Learning_overview_presentation.pptx
Machine learning based COVID-19 study performance prediction
Cloud computing and distributed systems.
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Empathic Computing: Creating Shared Understanding
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
MIND Revenue Release Quarter 2 2025 Press Release
sap open course for s4hana steps from ECC to s4
NewMind AI Weekly Chronicles - August'25-Week II
Building Integrated photovoltaic BIPV_UPV.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Spectroscopy.pptx food analysis technology
The Rise and Fall of 3GPP – Time for a Sabbatical?

MS SQLSERVER:Creating Views

  • 2. What is a ViewA 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 dataThe Illustration is made in the next slide.
  • 3. What is a ViewRemember that the view exists as query and not as a table
  • 4. SQL ViewsPoints to remember about SQL Views: View is inherently a query.
  • 5. 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
  • 6. Views are used to provide additional security over data
  • 7. It also prevents unwanted tampering of sensitive data
  • 8. Views provide performance benefitsCreating ViewsThe SQL syntax for creating a view is as follows:Create view <viewName>As …QUERY that results in a table/data…GOExample:Consider a student table:Create view NameListAsSelect regno,name from studentgoView
  • 9. Using ViewsAfter creating a view, it can used as if it is a table. It can queried like a normal table:Select * from nameListThe above query on the view will return:Thus, a view provides a good level of abstraction over the database.
  • 10. Modifying ViewsAn existing view is modified like using the alter view statement.The SyntaxAlter view <viewName>As …QUERY that results in a table/data…GOSimilar to the alter procedure statement, the alter table command redefines the existing view defenition.
  • 11. Deleting ViewsThe Syntax:Drop view <viewName>Example:Drop view nameList
  • 13. Creating Views
  • 14. Modifying Views
  • 15. Deleting ViewsVisit more self help tutorialsPick 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