Co-Authored By:

Asked by: Abderrazzaq Donati
technology and computing databasesWhat is view in SQL and why it is used?
A view is actually a composition of a table inthe form of a predefined SQL query. Views are usedfor security purpose in databases,views restricts the user fromviewing certain column and rows means by using view we canapply the restriction on accessing the particular rows and columnsfor specific user.
Furthermore, what is the purpose of views in SQL?
Use of a View Views are used for security purposesbecause they provide encapsulation of the name of the table. Datais in the virtual table, not stored permanently. Viewsdisplay only selected data. We can also use Sql Join s inthe Select statement in deriving the data for theview.
what are views How are they useful?
A view is a virtualtable based on the result-set of an SQL Statement. It has rows andcolumns like in a real table but does not hold thedata.
Simplicity - Views can be used to hide and reusecomplex queries.
Views can provide advantages over tables:
- Views can represent a subset of the data contained in atable.
- Views can join and simplify multiple tables into a singlevirtual table.