这是桌子
CREATE TABLE STUDENT
(
School_ID char(3),
St_LastName char(15),
St_FirstName char(15),
St_DOB char(15),
St_SS# char(15),
St_Address char(15),
St_City char(15),
St_State char(2),
st_Zip char(5),
st_phone char(15)
);
我必须编写查询:确定有多少学生没有电话。
我在 ACCESS 中写了以下查询
SELECT STUDENT.School_ID
FROM STUDENT
WHERE STUDENT.st_phone NOT IN( SELECT STUDENT.st_phone, Count(STUDENT.st_phone) AS StudentWithNoPhone FROM STUDENT
GROUP BY STUDENT.st_phone);
但它不起作用。