Creating a View

Function

This statement is used to create views.

Syntax

1
CREATE [OR REPLACE] VIEW view_name AS select_statement;

Keywords

Precautions

Example

To create a view named student_view for the queried ID and name of the student table, run the following statement:

1
CREATE VIEW student_view AS SELECT id, name FROM student;