In the standard workbench, the table data can be edited. For details on the data types that can be edited in various databases, refer to "8.3.7.3 Editable Data Types".
Connecting to the Database
Connect to the database. For details on database connection, refer to "8.3.1 Connecting to the Database".
Editing the Table Data
Use the following procedure to edit data in a table:
Select the table you want to display under [Tables] in the [Data Source Explorer] view, then select [Data] > [Edit] from the context menu.
Use the Table Data editor to edit the data. Data values can be changed, and the context menu can be used to insert rows and so on.
Select [File] > [Save] from the menu to save the data. Users can check if the data save succeeded in the [SQL Results] view.
Point
In some cases, rows can be inserted but rows cannot be deleted or updated.
For row deletion and update, a WHERE clause that specifies the target row is needed for the SQL statement DELETE or UPDATE. If the table has a primary key, the primary key column is specified in the WHERE clause. However, if the table does not have a primary key, all columns are specified in the WHERE clause. Therefore, if a table column is a data type that cannot be specified in a WHERE clause, an error occurs and row deletion or update fails.
The Table Data editor can be used to edit data in tables. The following data can be edited using this editor:
Character
If the data type of the column is a type that stores characters, data can be set using characters.
Numeral
If the data type of the column is a type that stores numerals, data can be set using numerals.
Floating point number
If the data type of the column is a type that stores floating point numbers, data can be set using floating point numbers.
Date and time
If the data type of the column is a type that stores dates and times, data can be set using specific formats. For the DATE type, set data in the "yyyy-mm-dd" format. For the TIME type, set data in the "hh:mm:ss" format. For the TIMESTAMP type, set data in the "yyyy-mm-dd hh:mm:ss.fffffffff" format.
Binary
If the data type of the column is a type that stores binary, data can be set using two-digit hexadecimal digits.
Point
For data that cannot be edited, null is the only value that can be set.
Data in tables can be extracted to a file, and file data can be loaded into a table.
Extracting Data from a Table
Table data can be saved in a file. Use the following procedure to extract the data:
Select the table you want to display under [Tables] in the [Data Source Explorer] view, then select [Data] > [Extract] from the context menu.
In the [Extract Data] dialog box, specify the file to be saved and the format. This file is a text file encoded in UTF-8.
Loading Data to a Table
File data can be loaded into a table. Use the following procedure to load the data:
Select the table you want to display under [Tables] in the [Data Source Explorer] view, then select [Data] > [Load] from the context menu.
In the [Load Data] dialog box, specify the file to be loaded and the format. The file must be a text file encoded in UTF-8.
Note
When loading the NCHAR type and NCHAR VARYING type of Symfoware Server data in the Java EE 6 workbench, the encoding of the file being loaded must be the same as the encoding of the text file of the workspace.
Confirm the encoding of the text file in [Window] > [Preferences] > [General] > [Workspace] in the Java EE 6 workbench.