安装过程需要注意:若cmd中无法搜寻到mysql—添加环境变量
构建连接时,设置密码要记住,后面忘记了修改密码麻烦
(一)查询语句–查询重复邮箱
所创建的表格:
查找email表中重复邮箱:
select * from email group by email having count(*) >1
则输出显示:
而查找不同邮箱则对应的是:
select * from email group by email having count(*)<2
(二)查询语句–查找大国
所创建的表格:
定义大国家:area>300万平方公里,或者 (population >2500万 and gdp>2000万)
SELECT name, population, area from world where area>3000000 or (population>25000000 and gdp>20000000 )
则输出显示: