CREATE VIEW

SQL CREATE VIEW Keyword

The CREATE VIEW command is used to define a view. A view is a virtual table that stores a predefined SELECT query. Views make complex data easier to read and reuse.

Tutorials dojo strip

SQL CREATE VIEW Syntax

SQL

SQL CREATE VIEW Syntax

This creates a view named FemalePatients that displays the first name, last name, and gender of all patients whose gender is F.

SQL

SQL CREATE VIEW Query the View Example

After creating the view, you can retrieve data from it like a regular table.

This will return all rows from the view showing only female patients.

SQL

SQL CREATE VIEW Labs

Tutorials dojo strip