为什么这个查询是faling?

Mah*_*ine -1 mysql

select * from temp where ssn not in (select distinct ssn from temp inner join
tamp where ssn,code_dars not in(select ssn,code_dars from temp));
Run Code Online (Sandbox Code Playgroud)

错误1064(42000):您的SQL语法有错误; 检查与您的MySQL服务器版本对应的手册,以便在第3行的'code_dars not(select ssn,code_dars from temp)'附近使用正确的语法

Ste*_*rig 5

事实DISTINCT并非如此distink.

行子查询的语法也是

SELECT * FROM t1
  WHERE (col1,col2) = (SELECT col3, col4 FROM t2 WHERE id = 10);
Run Code Online (Sandbox Code Playgroud)

要么

SELECT * FROM t1
  WHERE ROW(col1,col2) = (SELECT col3, col4 FROM t2 WHERE id = 10);
Run Code Online (Sandbox Code Playgroud)

请注意列周围的大括号.