Updated on 2023-03-17 GMT+08:00

Result Management

This section describes how to customize the settings in the Query Results pane, including the column width, number of records to be obtained, and copy of column headers or row numbers.

Query Results

Configure the column width of query results:

  1. Choose Settings > Preferences from the main menu.

    The Preferences dialog box is displayed.

  1. Choose Result Management > Query Results.

    The Query Results pane is displayed.

  2. Select the required option.

    The options of configuring the column width are as follows.

    Option

    Outcome

    Content Length

    You can set the column width based on the content length of the query result.

    Custom Length

    You can customize the column width.

    NOTE:

    This value ranges from 100 to 500.

  3. Click OK.

    Click Restore Defaults in Query Results to restore the default value. The default value is Content Length.

Set the number of records to be obtained in the query results:

  1. Choose Settings > Preferences from the main menu.

    The Preferences dialog box is displayed.

  2. Choose Result Management > Query Results.

    The Query Results pane is displayed.

  3. Select the required option.

    Option

    Outcome

    Fetch All records

    You can obtain all records in the query results.

    Fetch custom number of records

    You can set the number of records to be obtained in the query results.

    NOTE:

    This value ranges from 100 to 5000.

  4. Click OK.

    Click Restore Defaults in Query Results to restore the default value. The default value is Fetch custom number of records (1000).

Copy column headers or row numbers from query results:

  1. Choose Settings > Preferences from the main menu.

    The Preferences dialog box is displayed.

  2. Choose Result Management > Query Results.

    The Query Results pane is displayed.

  3. Select the required option.

    Option

    Outcome

    Include column header

    You can copy column headers from the query results.

    Include row number

    You can copy the selected content along with the row number from the query results.

  4. Click OK.

    Click Restore Defaults in Query Results to restore the default value. The default value is Include column header.

Determine how the result set window is opened:

  1. Choose Settings > Preferences from the main menu.

    The Preferences dialog box is displayed.

  2. Choose Result Management > Result Window.
  3. Select the required option.

    Option

    Outcome

    Overwrite Resultset

    After an opened result set window is closed, a new result set window will be opened.

    Retain Current

    After a new result set window is opened, the opened result set windows are not closed.

  4. Click OK.

Edit Table Data

Perform the following steps to determine the data saving mode:

  1. Choose Settings > Preferences from the main menu. The Preferences dialog box is displayed.
  2. Choose Result Management > Edit Table Data. The Edit Table Data pane is displayed.

    Select the required option:
    Table 1 Editing table data

    Database Type

    Auto Commit

    Reuse Connection

    Table Data Save Option

    Behavior

    GaussDB(DWS)

    ON

    ON

    Save Valid Data

    Only the valid data will be saved and committed.

    ON

    ON

    Do Not Save

    No data will be saved when an error occurs.

    ON

    OFF

    Save Valid Data

    Only the valid data will be saved and committed.

    ON

    OFF

    Do Not Save

    No data will be saved when an error occurs.

    OFF

    ON

    Save Valid Data

    No data will be saved when an error occurs. Execute the COMMIT or ROLLBACK statement to save data.

    OFF

    ON

    Do Not Save

    No data will be saved when an error occurs. Execute the COMMIT or ROLLBACK statement to save data.

  3. Click OK.

    Click Restore Defaults in Edit Table Data to restore the default value. The default value is Save Valid Data.

Result Data Encoding

Perform the following steps to

configure whether data encoding type is displayed in the Query Results, View Table Data, and Edit Table Data panes.

  1. Choose Settings > Preferences from the main menu.

    The Preferences dialog box is displayed.

  2. Choose Result Management > Query Results.

    The Query Results pane is displayed.

  3. Select Include result data encoding to display the Encoding drop-down list in the Query Results, View Table Data, and Edit Table Data panes.
  4. Click OK.

    • Click Restore Defaults in Result Management to restore the default value. Include result data encoding will be unselected by default.
    • To make the change take effect, you need to edit a table, view table properties, or execute a query again.