Neoview SQL Reference Manual (R2.4)
(SELECT deptnum FROM persnl.dept
WHERE location = 'CHICAGO');
The subquery is evaluated for each row of the DEPT table and returns department numbers
for departments located in Chicago.
• Suppose that you want to change the employee number of a manager of a department.
Because EMPNUM is a primary key of the EMPLOYEE table, you must delete the employee's
record and insert a record with the new number.
You must also update the DEPT table to change the MANAGER column to the employee's
new number. To ensure all your changes take place (or that none of them do), perform the
operation as a transaction:
SET TRANSACTION
ISOLATION LEVEL SERIALIZABLE;
--- SQL operation complete.
BEGIN WORK;
--- SQL operation complete.
DELETE FROM persnl.employee
WHERE empnum = 23;
--- 1 row(s) deleted.
INSERT INTO persnl.employee
(empnum, first_name, last_name, deptnum, salary)
UPDATE Statement 201