Oracle SQL - What Are Views?

Introduction

The result of a query is a derived table.

A view is a query with a given name.

It is a virtual table with the result of a stored query.

The content of the virtual table are derived each time you access the view.

A view is a virtual table so that you can treat a view as a table in your SQL statements.

Every view has a name, and that's why views are referred to as named queries.

Views have columns, each with a name and a data type, so you can execute queries against views.

You can manipulate the "contents" of views with some restrictions with INSERT, UPDATE, DELETE, and MERGE commands.

When you access a view, it only behaves like a table. Views don't have any rows.

You cannot create indexes on views.

If you issue data manipulation commands against a view, the DBMS translates those commands into corresponding actions against the underlying tables.

A view would stop working if you drop or rename columns of the underlying tables that are referenced in the view definition.

If you define an index on a column in the underlying table, it may be used by queries via the view.

Related Topics