Editing Table Data

Follow the steps below to edit table data:

  1. Right-click the selected table and select Edit Table Data.

    The Edit Table data tab is displayed.

    Refer to Viewing Table Data for description on copy and search toolbar options.

Data Studio validates only the following data types entered into cells:

Bigint, bit, boolean, char, date, decimal, double, float, integer, numeric, real, smallint, time, time with time zone, time stamp, time stamp with time zone, tinyint, and varchar. Editing of array type data type is not supported.

Any related errors during this operation reported by database will be displayed in Data Studio. Time with time zone and timestamp with time zone columns are non-editable columns.

You can perform the following operations in the Edit Table Data tab:

Insert

Follow the steps to insert a row:

  1. Click image1 to insert a row.

  2. Double-click the cell to modify and enter the required details in the row.

  3. Click image2 to save changes.

    The Edit Table Data tab status bar shows the Query Submit Time, Number of Rows Fetched, Execution Time and Status of the operation.

    Important

    Data Studio updates rows identified by the unique key. If a unique key is not identified for a table and there are identical rows, then an update operation made on one of the rows will affect all identical rows. Refresh the Edit Table Data tab to view the updated rows.

    Note

    • Changes to cells in a row that are not saved are highlighted in green. Once saved the color resets to default color.

    • Unsaved records are highlighted in red. The number of successful and failed records are displayed in the status bar of the Edit Table Data tab.

    • Clicking Save either saves all the valid changes or does not save anything if there are invalid changes. Refer to Editing Table Data to set the behavior of save operation.

  4. Click image3 to roll back the changes that are not saved.

  5. Set the preference to define:

    • Number of records to be fetched

    • Column width

    • Copy option from result set

      For details, see Query Results.

Data Studio allows you to edit the distribution key column only for a new row.

Delete

Follow the steps to delete a row:

  1. Click the row header of the row to be deleted.

  2. Click image4 to delete a row.

  3. Click image5 to save changes. The Define Unique Key dialog box is displayed.

  4. Click the required option:

    • Use All Columns

      Click Use All Columns to define all columns as unique key.

    • Custom Unique Key

      1. Click Custom Unique Key to define selected columns as unique key.

      2. The Define Unique Key dialogue box is displayed.

      3. Select the required columns and click OK.

    • Cancel

      Click Cancel to modify the information in Edit Table Data tab.

      The Edit Table Data tab status bar shows the Query Submit Time, Number of Rows Fetched, Execution Time and Status of the operation.

      Select Remember the selection for this window option to hide the unique definition window from displaying while continuing with the edit table data operation. Click image6 from Edit Table Data toolbar to clear previously selected unique key definition and display unique definition wind

    Note

    • Changes to cells in a row that are not saved are highlighted in green. Once saved the color resets to default color.

    • Unsaved records are highlighted in red. The number of successful and failed records are displayed in the status bar of the Edit Table Data tab.

    • Clicking Save either saves all the valid changes or does not save anything if there are invalid changes. For details, see Editing Table Data.

  5. Click image7 to roll back the changes that are not saved.

  6. Refresh the table data to view deleted duplicate rows.

Update

Follow the steps to update cell data:

  1. Double-click the cell to update the contents of the cell.

  2. Click image8 to save changes.

    The Define Unique Key dialog box is displayed.

  3. Click the required option:

    • Use All Columns

      Click Use All Columns to define all columns as unique key.

    • Custom Unique Key

      1. Click Custom Unique Key to define selected columns as unique key.

      2. The Define Unique Key dialogue box is displayed.

      3. Select the required columns and click OK.

    • Cancel

      Click Cancel to modify the information in Edit Table Data tab.

      The status bar shows the Execution Time and Status of the operation.

      Select Remember the selection for this window option to hide the unique definition window from displaying while continuing with the edit table data operation. Click image9 from Edit Table Data toolbar to clear previously selected unique key definition and display unique definition wind

      Note

      • Changes to cells in a row that are not saved are highlighted in green. Once saved the color resets to default color.

      • Unsaved records are highlighted in red. The number of successful and failed records are displayed in the status bar of the Edit Table Data tab.

      • Clicking Save either saves all the valid changes or does not save anything if there are invalid changes. For details, see Editing Table Data.

  4. Click image10 to roll back the changes that are not saved.

  5. Refresh the table data to view deleted duplicate rows.

During the edit operation, Data Studio does not allow you to edit the distribution key column as it is used by the DB to locate data in the database cluster.

Copy

You can copy data from the Edit Table Data tab.

Follow the steps to copy data:

  1. Select the cell(s) and click image11 (Copy) or image12 (Advanced Copy).

    For more information about the differences between Copy and Advanced Copy, see Execute SQL Queries.

    Note

    • Data can be copied to include the row number and/or column header. Refer to Query Results to set this preference.

    • Select part of cell content and press Ctrl+C or click image13 to copy selected text from a cell.

Paste

You can copy data from a CSV file and paste it into cells in the Edit Table Data tab to insert and update records. If you paste onto existing cell data, the data is overwritten with the new data from the CSV file. Follow the steps to paste data into a cell:

  1. Copy data from the CSV file.

  2. Select the cell(s) and click image14.

  3. Click image15 to save changes. The Define Unique Key dialog box is displayed.

  4. Click the required option:

    • Use All Columns

      Click Use All Columns to define all columns as unique key.

    • Custom Unique Key

      1. Click Custom Unique Key to define selected columns as unique key.

      2. The Define Unique Key dialogue box is displayed.

      3. Select the required columns and click OK.

    • Cancel

      Click Cancel to modify the information in Edit Table Data tab.

      The status bar shows the Execution Time and Status of the operation.

      Select Remember the selection for this window option to hide the unique definition window from displaying while continuing with the edit table data operation. Click image16 from Edit Table Data toolbar to clear previously selected unique key definition and display unique definition wind

      Note

      • The number of copied cells from CSV must match the number of cells selected in the Edit Table Data tab to paste the data.

      • Click image17 to roll back the changes that are not saved.

      • Changes to cells in a row that are not saved are highlighted in green. Once saved the color resets to default color.

      • Unsaved records are highlighted in red. The number of successful and failed records are displayed in the status bar of the Edit Table Data tab.

      • Clicking Save either saves all the valid changes or does not save anything if there are invalid changes. For details, see Editing Table Data.

During the pasting operation, Data Studio does not allow you to edit the distribution key column as it is used by the DB to locate data in the database cluster.

Note

Empty cells are shown as [NULL]. Empty cell in Edit Table Data tab can be searched using the Null Values search drop-down.

Refer to Execute SQL Queries for information on show/hide search bar, sort, column reorder, and encoding options..