SQL Server Things (Databases, Cursor, Indexes, Tables, Views, Stored Procedure, Functions and Triggers).
This contains the brief of the mentioned topics in the title and the possible best suitable link to explain in the details.
- Views:
A view provides several benefits.
A view provides several benefits.
- Views can hide complexity:If you have a query that requires joining several tables, or has complex logic or calculations, you can code all that logic into a view, then select from the view just like you would a table.
- Views can be used as a security mechanism:A view can select certain columns and/or rows from a table, and permissions set on the view instead of the underlying tables. This allows surfacing only the data that a user needs to see.
- Views can simplify supporting legacy code:If you need to refactor a table that would break a lot of code, you can replace the table with a view of the same name. The view provides the exact same schema as the original table, while the actual schema has changed. This keeps the legacy code that references the table from breaking, allowing you to change the legacy code at your leisure.
These are just some of the many examples of how views can be useful.
Below are the links that explains in the better why the views are most powerful and why is brought in to existence as Tables are already available.
- Stored Procedure
Comments
Post a Comment