,可以通过以下步骤实现:
示例SQL查询语句如下:
SELECT Employee.EmployeeID, Employee.Name, Project.ProjectID, Project.ProjectName
FROM Employee
INNER JOIN Allocation ON Employee.EmployeeID = Allocation.EmployeeID
INNER JOIN Project ON Project.ProjectID = Allocation.ProjectID
INNER JOIN Department ON Department.DepartmentID = Employee.DepartmentID
WHERE Department.DepartmentID <> Employee.DepartmentID
领取专属 10元无门槛券
手把手带您无忧上云