Manage views

更新时间:
复制 MD 格式

In OceanBase Developer Center (ODC), after you open a connection, click the Views tab in the navigation pane on the left. The list displays all views in the current database connection. From the list, you can view the structure tree of a view or right-click a view to perform management operations. You can also double-click a view name to open the view management page, which contains the Properties and Data tabs.

Structure tree

In the view list, you can click the drop-down icon next to a view name to display its structure tree. The structure tree of a view has up to three levels. You can right-click an item at any level of the structure tree to see a list of operations. For more information about these operations, see the Management operations table in the Management operations section.

Management operations

When you right-click an item in the structure tree, ODC provides a shortcut menu with operations to quickly manage the object.

The following table describes the management operations.

Operation

Description

View Properties

Opens the Properties tab. This tab displays the basic information, columns, and code for the view.

View Data

Opens the Data tab to display the data in the view.

Export

Exports the selected object. You can also export multiple objects at once. For more information, see Import and export.

Download

Downloads the view definition as an SQL file.

Copy

You can select an object name, a Select statement, an Insert statement, an Update statement, or a Delete statement.

Delete

Deletes the view.

Properties and Data tabs

image.png

  • Properties tab:

    • Basic Information: Displays information such as View Name, Check Option, and Creator.

    • Columns: Displays information about the columns of the view's base table, such as Column Name, Data Type, and Comment. In the toolbar, you can click the refresh icon to update the column information.

    • Code: Displays the definition script for the view. In the toolbar, you can click the download icon to download the Data Definition Language (DDL) script as a local file. You can also click the format icon to format the statement for better readability.

  • Data tab: Displays the columns and data within the view. The toolbar provides the following functions:

    Operation

    Description

    Download

    Click the download icon to download the result set.

    Go to first page

    Navigates to the first page.

    Previous page

    You can scroll up.

    Next page

    Navigates to the next page.

    Jump to bottom

    Navigates to the last page.

    Displaying data volume

    Sets the number of rows to display on each page. The default is 1000.

    Search

    Searches the view data by keyword.

    Column management

    Lets you select which columns to display on the page.

    Column mode

    Displays the data of the currently selected row in a table format. On the Column Mode page, you can switch between the previous and next rows. In scenarios with many columns, Column Mode makes it easy to view the data of a single row.

    Refresh

    Refreshes the data in the table.