IntelliJ IDEA 2022.3 Help

Views

A view is a database object that usually represents a database query and can be used as an ordinary table. For more information see your DBMS documentation.

When you double-click a view in the Database tool window ( View | Tool Windows | Database), the view is opened in the editor in the Table view. For more information about the views, see View data.

Views can be seen in the Database tool window. You can see a reference on node and object icons in the Icons for data sources and their elements chapter of Database tool window topic.

Create a view

  1. In the Database tool window ( View | Tool Windows | Database), expand the data source tree until the node of a schema.

  2. Right-click a schema and select New | View.

  3. In the Name field, enter the name of your view.

  4. In the Preview pane, enter the statement.

  5. Click OK.

    Create a view

Modify a view

  1. In the Database tool window ( View | Tool Windows | Database), right-click a view and select Navigation | Go to DDL. Alternatively, press Ctrl+B.

  2. In the DDL editor that opens, make changes to the source code of your view.

    Modify a view using the DDL editor
  3. Click the Submit button (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 IntelliJ IDEA's virtual object. For more information on virtual views, refer to Virtual views.

    Virtual view
Last modified: 18 January 2023