Professional Documents
Culture Documents
• Views:
1) No need to have a PRIMARY KEY in the original table to create a view.
2) Inserting a value in a view inserts a corrosponding value in the original table with
NULL in the fields not included in the view.
3) Cannot insert in a view if the original table has as a PRIMARY KEY but the view
does not have that field.
4) Fields can have NULL values in the rows.
5) A view is by default updatable if the original table does not have a PRIMARY
KEY.
Example of an updatable view: table:temp(primary key(rollno))
view:
• Stored Procedures
1. way to store a query to use it again.
2. Comes handy when a particular query is fired very frequently.
3. Faster as they are cached in the server