Editing Results
 

If supported by the JDBC driver it is possible to edit a result table. Requirement for the editing of the result is the existence of a primary key column in the result table (displayed in yellow) and a simple select statement with only one table in the from clause. It is possible to define the primary key columns manually if the driver doesn't support automatic detection by clicking with the right mouse button on the column header.


Updating Rows

Only columns with simple data types like string, number or date are editable. The plugin creates an 'update' statement from the primary keys, the table name from the select query and the column name.

Example:

Starting Point:

Editing: Change 'Bunnie' to 'Bunny' in first row.

Result:

The plugin doesn't commit after executing the update statement so if you not enable 'Auto-Commit' the changes must still be commited by clicking on the 'Commit' button in the toolbar or executing the 'commit' statement. If you mark a column as primary key which is not a real primary key its possible that more than one row will be updated.

Editing Dates

There are some special strings which can be entered for faster editing.

Entered StringWill be replaced by
sysdate or nowCurrent time
today or 0Today 0:00
tomorrowTomorrow 0:00
yesterdayYesterday 0:00
+X or +XdToday 0:00 + X days
-X or -XdToday 0:00 - X days
+XwToday 0:00 + X weeks
-XwToday 0:00 - X weeks
+XmToday 0:00 + X months
-XmToday 0:00 - X months
+XyToday 0:00 + X years
-XyToday 0:00 - X years

Deleting Rows

To delete a row from a result set you only have to open the context menu and select 'Delete Row'.

If the deletion was successful the deleted row will appear striked through with a red line.

The plugin doesn't commit after executing the delete statement so if you not enable 'Auto-Commit' the changes must still be commited by clicking on the 'Commit' button in the toolbar or executing the 'commit' statement. If you mark a column as primary key which is not a real primary key its possible that more than one row will be deleted.