Views in SQL

A view in SQL is the result of a multi-table query that appears to you as a single table.

Let me explain, for example, you need to know data from two tables but you need them to appear at the same time and whenever you execute a certain sentence that is given by a name that you have given it yourself.

If a table is deleted the associated view is invalidated.

Format:

CREATE VIEW VIEWNAME
)]
AS QUERY;

AS QUERY= Determines the columns and tables that will appear in the view.
= Create the view again if it already existed.

To query the created view, USER_VIEWS:

SELECT VIEW_NAME FROM…

If you want to delve deeper into the views I recommend that you read the

See also  cyclic structures
Loading Facebook Comments ...
Loading Disqus Comments ...