上面给出了数据库。
我有一个 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;
(上面的说法不成立)