Editing Table Data

Use the Table Data Editor to modify data in tables and proxy tables.

You can insert, update, or delete rows, using one of the possible primary keys of the table to uniquely identify the row. If no primary key is available, all the columns are used. You can also edit content of individual cells. Your table changes appear in the local view until you explicitly commit them to the database.

  1. Expand the Tables folder and open a table in the Table Data Editor.
    Option Description
    From Enterprise Explorer: Right-click the table and select Edit Data.
    From Referenced Tables: After debugging a procedural object, right-click one of the referenced tables or proxy tables and select Edit Table Data.

    The Table Data Filter dialog displays. To improve performance on larger tables and to focus on data that you want to work on, you can filter the table data before opening the table.

    Note: You can select the Do not show this dialog again check box to bypass the Table Data Filter dialog. You can also set this value in the Preferences page.
  2. From the Table Data Filter dialog, select columns to filter, along with the Where clause and Order by values.

    You can also set the maximum number of rows to retrieve.

  3. Click OK.

    The table opens for editing.

    Note: Editing functions are disabled if the table is read-only.
  4. Double-click the cell to enter edit mode and make the changes.

    You can also right-click a cell in edit mode to do the following:

    Option Description
    Undo Undo changes to data in table cell.
    Cut Cut data from table cell and place it on the clipboard.
    Copy Copy data from table cell and place it on the clipboard.
    Paste Paste data from the clipboard to the table cell.
    Delete Delete data from the table cell.
  5. Right-click the table and select any of the following options:
    Option Description
    Revert Discards all uncommitted changes. Reverting changes does not guarantee that the original data is synchronized with data in the database. To synchronize the data, select Refresh.
    Revert Selected Row Discards all uncommitted changes in the selected row.
    Refresh Reloads the table data from the database and synchronizes the table data with the data in the database.
    Cut Row Cuts the selected row.
    Copy Row Copies the selected row.
    Paste Row Pastes data into a new row.
    Update Value Enters edit mode for the selected cell. From edit mode, you can make changes to the cells.
    Insert Row Inserts a new row after the last row of the table.
    Delete Row Deletes the selected row. If you filtered out columns, or if the table has no primary key, this will cause a problem in deleting row.
    Set Null Sets the value in the selected cell to NULL.
    Truncate Table Truncates the table data.
    Note: You must unpartition a table before truncating it. You also cannot truncate a table if another table references it. Delete the rows from the foreign table first, or truncate the foreign table, then truncate the primary table.
    Filter Table Data Opens the Table Data Filter dialog where you can filter the table data by selecting columns to filter, the Where clause and Order by values. You can also set the maximum number of rows to retrieve.
    Preview SQL Statement Displays the SQL Statement. You can view the SQL Statement and save it to an external file.
    Extract Table Data Opens the Extract Table Data dialog where you can extract the selected data to an external file.
    Commit to Database Saves the changes and commits them to the database.
    Preferences Opens the Preferences page where you can change general settings for the Table Data editor.

    To edit image data, edit the hexadecimal code that appears in the cell, for example, 0x031328.

  6. Select File > Save to save and commit the changes to the database.

    A summary of the changes that you made is displayed in Status.

  7. Click Close.
Related concepts
Table Data Editor
Related tasks
Extracting Table Data
Filtering Table Data
Truncating Table Data
Related reference
Table Data Editor Preferences
Extract Format

Send your feedback on this help topic to Sybase Technical Publications: pubs@sybase.com

Your comments will be sent to the technical publications staff at Sybase, Inc. For product-related issues or technical support, contact Sybase Technical Support at 1-800-8SYBASE.