Gaurav Malviya
What are the advantages of VIEW?
By Gaurav Malviya in SQL Server on Jan 14 2014
  • Manju lata Yadav
    Jul, 2014 1

    Restrict a user to specific rows in a table.For example, allow an employee to see only the rows recording his or her work in a labor-tracking table.Restrict a user to specific columns.For example, allow employees who do not work in payroll to see the name, office, work phone, and department columns in an employee table, but do not allow them to see any columns with salary information or personal information.Join columns from multiple tables so that they look like a single table.Aggregate information instead of supplying details.For example, present the sum of a column, or the maximum or minimum value from a column.

    • 2
  • Shaveta Chatak
    Apr, 2014 4

    View can be categorized either as a compiled sql query or a virtual table. As a view represents a virtual table, it does not physically store any data. When you query a view, you actually retrieve the data from the underlying base tables. Some more advantages:1.Views can be used to implement row level and column level security.Example 1: Consider the tblEmployee table. I don't want some of the users to have access to the salary column, but they should still be able to access ID, NAME and DEPT columns. If I grant access to the table, the users will be able to see all the columns. So, to achieve this, I can create a view. Now, grant access to the view and not the table. So using views we can provide column level security. 2. Simplify the database schema to the users. You can create a view based on multiple tables which join columns from all these multiple tables so that they look like a single table. 3. Views can be used to present aggregated and summarized data. 4. Parametrized views can be created using Inline UDF. 5. View can be materialized when indexed.

    • 1
  • Gaurav Malviya
    Jan, 2014 14

    - To protect some of the columns of a table from other users. 
    - To hide complexity of a query. 
    - To hide complexity of calculations.

    • 1
  • Ashish Srivastava
    Feb, 2016 4

    - To hide complexity of a query. - To hide complexity of calculations. - Security

    • 0
  • Rakesh Kalluri
    Dec, 2014 4

    The main use of view is hiding some rows data or some columnshttp://headfirstsql.blogspot.in/2014/07/views-in-real-time-senario.html

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS