TechView with Kamlesh khaliya

Resources for OCP, Oracle Interviews(kamleshkhaliya@gmail.com)

Wednesday 13 July 2011

What are views in oracle?

Views are generally the presentations of SQLs that can be based on one or more tables or views, and the sql for the view reside in the meta data for further use. Views can be used wherever a table can be used so it's also known as virtual table.
Since views actually do not contain physical data so on every time you execute sql on a view, oracle executes the sql of that view first from meta data, and prepares a data set.
Your sql executes on that data set only.

Views are generally used for restricting access on data, for e.g. if you have table emp with many columns and many rows and if you want user to access only 4 columns and 19 records than you can create a view.

Similar to tables a view can have only 1000 columns. And similar to tables a view can be queried and modified (like insert, update, or delete) with some restriction. All such operation performed on a view is actually happen on the base tables.

You can view the information about the views with user_views, all_views, dba_views data dictionary views.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home