以下有两个表,他们的结构完全相同,请通过SQL找出值不同的列。 Student_1 NAME AGE SCORE peter 26 100 jack 25 96 daniel 26 48 bark 21 69 Student_2 NAME AGE SCORE peter 26 89 jack 25 96 daniel 26 48 bark 21 69 具体相关方法一 -- NOT EXISTS: 复制具体相关代码 具体相关代码如下: SELECT * FROM Student_1 S1 WhERE NOT EXISTS (SELECT * FROM Student_2 S2 WhERE S1.name = S2.name AND S1.age = S2.age AND S1.score = S2.score ) UNION ALL SELECT * FROM STUDENT_2 S2 WhERE NOT EXISTS (SELECT * FROM STUDENT_1 S1 WhERE S1.name = S2.name AND S1.age = S2.age AND S1.score = S2.score ); 具体相关方法二 -- MINUS 复制具体相关代码 具体相关代码如下: (SELECT * FROM Student_1 MINUS SELECT * FROM Student_2) UNION ALL (SELECT * FROM Student_2 MINUS SELECT * FROM Student_1) 具体相关方法三 -- hAVING GROUP BY 复制具体相关代码 具体相关代码如下: SELECT DISTINCT name, age, score FROM ( SELECT * FROM Student_1 UNION ALL SELECT * FROM Student_2 )GROUP BY name, age, score hAVING COUNT(*)=1 ;基于mysql事务、视图、存储过程、触发器的应用分析