当前位置: 移动技术网 > IT编程>数据库>MSSQL > 学习SQL语句中的出错的和疑问分享

学习SQL语句中的出错的和疑问分享

2019年01月06日  | 移动技术网IT编程  | 我要评论

dhl快递公司,重生之欧美纵横,延纳里斯

下面是我学习sql语句中的出错的和疑问,算是总结。

8. exclusive or (xor). show the countries that are big by area or big by population but not both. show name, population and area.

australia has a big area but a small population, it should be included.indonesia has a big population but a small area, it should be included.china has a big population and big area, it should be excluded.united kingdom has a small population and a small area, it should be excluded.

select name,population,area from world
 where  ((area < 3000000 and population>250000000) or (area > 3000000 and population < 250000000))

有没有更简单的写法?

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网