我正在尝试将两个表中的数据连接到USSN不为空的表中;
在没有添加“WHERE CONTACT2.USSN IS NOT NULL”的情况下,它完美运行。没有运气,我尝试了不同的排列。
SELECT B.CONTACT,
B.LASTNAME,
B.PHONE1,
B.PHONE2,
B.PHONE3,
A.ACCOUNTNO,
A.USCOREEFX,
A.USCORETUC,
A.USCOREXPN,
A.USCORE1EFX,
A.USCORE1TUC,
A.USCORE1XPN
FROM CONTACT2 A
INNER JOIN CONTACT1 B
ON A.ACCOUNTNO = B.ACCOUNTNO
WHERE USSN IS NOT NULL
答案 0 :(得分:0)
我明白了。
SELECT B.CONTACT,
B.LASTNAME,
B.PHONE1,
B.PHONE2,
B.PHONE3,
A.ACCOUNTNO,
A.USCOREEFX,
A.USCORETUC,
A.USCOREXPN,
A.USCORE1EFX,
A.USCORE1TUC,
A.USCORE1XPN
FROM CONTACT2 A
INNER JOIN CONTACT1 B
ON A.ACCOUNTNO = B.ACCOUNTNO
WHERE A.USSN IS NOT NULL