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.
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 String | Will be replaced by |
sysdate or now | Current time |
today or 0 | Today 0:00 |
tomorrow | Tomorrow 0:00 |
yesterday | Yesterday 0:00 |
+X or +Xd | Today 0:00 + X days |
-X or -Xd | Today 0:00 - X days |
+Xw | Today 0:00 + X weeks |
-Xw | Today 0:00 - X weeks |
+Xm | Today 0:00 + X months |
-Xm | Today 0:00 - X months |
+Xy | Today 0:00 + X years |
-Xy | Today 0:00 - X years |
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.
|