Update Row
The Row Detail window can also be used for updating, deleting and inserting
rows.
-
Clicking on Row will put you into update / delete / insert mode.
-
It has an "Update Dup" mode, where you can update a row using another
one as a template.
-
You can update more than just this row (you specify the Where conditions
for the update so you can update any given set of rows).
-
AQT will generate SQL for the update; you can view this with Preview
SQL. The SQL can be amended or saved for running later.
-
AQT has a number of features which help you doing updates. One of these is
"Get Existing Values" (as in the screenshot below) which gives you a
drop-down list of the existing values for the column.
Because AQT allows you to update many rows, even a whole table, it has a
number of controls to prevent people updating or deleting more rows than
intended. Any DBA can tell you stories of someone deleting or updating every row
in the table, when they just meant to change just one!
-
Before running an Update, click on Check Number. This will tell you how many rows will be
affected by this update.
-
By selecting Transaction, you can enter Transaction mode. With this,
your changes are only committed once you explicitly do a Commit (or Rollback).
You can run multiple updates, and even view the contents of the table, before
making the decision whether to commit the change.
-
AQT also has feature called "Safe Update Mode". With this, you
will get a warnng message if you update/delete more than 1 row. You will be
given an option to commit the change or backout. This applies to any update in
AQT (not just through the window shown here). This feature can be configure or
switched off.
|