我有一个表,该表具有EmpID确定项(EmpLastName,EmpFirstName,Phone)的功能依赖性。我可以在WHERE子句中多次使用AND来包含所有属性吗?
SELECT T1.EmpID, A1.EmpLastName, A1.EmpFirstName, A1.Phone
FROM EMPLOYEE AS A1
WHERE EXISTS
(SELECT A2.EmpID
FROM EMPLOYEE AS A2
WHERE A1.EmpID = A2.EmpID
AND A1.EmpLastName <> A2.EmpLastName
AND A1.EmpFirstName <> A2.EmpFirstName
AND A1.Phone <> A2.Phone);
我希望代码将显示违反功能依赖性的任何行的值。
答案 0 :(得分:0)
是。是的,当然可以。