• How to create and use of view in SQL?

    by  • November 14, 2015 • Microsoft .NET Framework, Microsoft SQL Server • 0 Comments

    View is a virtual table that does not have physical existence in database. It is just like a virtual table and set of queries that applied to one or more tables. It is stored in database like table. It contains column and data from multiple tables.

    Create Table:

    Before create view, first create the table and name it Employee.

    Use of View:

    Views are used for security purposes because they provide encapsulation of the name of the table. Data is in the virtual table, not stored permanently. Views display only selected data.

    For example:

    Now user can use the view EmployeeView as a table to get the empid, empname and employmentdate information of the employees by using the following query:




    Namecheap.com
    Avatar of Abdul Rehman

    About

    Abdul Rehman writes on .NET technologies at GetCodeSnippet.com. GetCodeSnippet.com provides you high quality Microsoft .NET development related articles, tutorials and sample code for ASP.NET, C#, VB.NET, AJAX, WCF, WPF, Web Services, Windows Services, SQL Server and other technologies.

    http://getcodesnippet.com

    Leave a Reply