
上記のデータベースが提供されます。
私は EmployeeGood Employeeと別の Employeeを持っていExcellent Employeeます。Excellent Employee部門を運営しています。
私は自分のデータベースを更新したいので、Good Employee率いる部門で働いていますExcellent Employee
このようなことは可能ですか?
UPDATE Employee
SET Department = (
SELECT AID
FROM Department
WHERE AID = Department AND Employee.Name = 'Excellent Employee')
WHERE Name = 'Good Employee' LIMIT 1;
(上記のステートメントは機能しません)