Views
A view is a database object that usually represents a database query and can be used as an ordinary table. For more information, refer to your DBMS documentation.
When you double-click a view in the Database tool window ( ), the view is opened in the editor in the Table view. For more information about the views, refer to View data.
Views ( ) can be found in the Database tool window. For the reference on other node and object icons, refer to the Data sources and their elements chapter of Database tool window topic.
![Views in Database Views in Database](https://resources.jetbrains.com/help/img/idea/2024.2/database_object_view.png)
Create a view
In the Database tool window ( ) , expand the data source tree until the nodes of schemas.
Right-click the schema node and select
.In the Create dialog that opens, enter the name of your view in the Name field.
In the Source Text pane, enter the statement.
In the Preview pane, you can view and change the generated SQL code.
Click OK to add your view.
![Create a view Create a view](https://resources.jetbrains.com/help/img/idea/2024.2/db_create_view.png)
Modify a view
In the Database tool window ( ) , right-click a view and select . Alternatively, press Ctrl+B.
In the DDL editor that opens, make changes to the source code of your view.
Click the Submit button (
). Alternatively, press Ctrl+K.
Virtual views
If you need to run the same statement and view its result set often, consider using a virtual view which is a CLion's virtual object. For more information about virtual views, refer to Virtual views.