数据库
首页 > 数据库> > MySQL_Day1

MySQL_Day1

作者:互联网

此博客用来简单总结一下本人SQL学习中的小进步:

Sql奇偶数定义:

单表重复行查询:

SELECT * 
FROM people
WHERE peopleId in (SELECT peopleId FROM people GROUP BY peopleId HAVING COUNT(peopleId) > 1);

多表之间的差异查询:

SELECT A.*
FROM A
    LEFT JOIN B ON (A.C = B.C)
WHERE B.C IS NULL;
SELECT A.*, B.*
FROM A
    FULL JOIN B ON (A.C = B.C)
WHERE A.C IS NULL OR B.C IS NULL;

 

 

标签:JOIN,Day1,peopleId,MySQL,但表,NULL,WHERE,SELECT
来源: https://blog.csdn.net/crystaltea/article/details/92427488