ASA Getting Started
Updating the Database
In most databases, you need to update records that are already stored in the database. For example, the manager ID should change when employees are transferred between departments, as well as the department ID.
Transfer employee #195 to department 400 in Interactive SQL
In Interactive SQL, type the following in the SQL Statements pane and press F5 to execute the statement.
UPDATE employee SET dept_id = 400, manager_id = 1576 WHERE emp_id = 195
The statement carries out both updates at the same time for employee Marc Dill (employee ID 195).
Since Adaptive Server Anywhere updates all rows that satisfy the conditions of the WHERE clause, sometimes more than one row is updated at one time. For example, if a group of sales employees are transferred into marketing and have their dept_id column updated, the following statement sets the manager_id for all employees in the marketing department to 1576.
UPDATE employee SET manager_id = 1576 WHERE dept_id = 400
For employees already in the marketing department, no change is made.
You can also modify rows from the result set in Interactive SQL.
For more information, see Editing table values in Interactive SQL.