老師讀錯(cuò)了就錯(cuò)了,并不影響教你sql,你牛逼你去講啊,不要著相了,知道來是搞基的還是學(xué)習(xí)的?
2018-01-13
* 加上or null后,count統(tǒng)計(jì)數(shù)據(jù)的時(shí)候就會(huì)排出非2006/2008之外的數(shù)據(jù),如果不加or null,則count會(huì)默認(rèn)計(jì)數(shù),等同于count(*)了。
2018-01-11
mysql> select count(year='2006' or null) as '2006' ,count(year='2009' or null) as '2008' from y;
+------+------+
| 2006 | 2008 |
+------+------+
| 2 | 1 |
+------+------+
1 row in set (0.00 sec)
+------+------+
| 2006 | 2008 |
+------+------+
| 2 | 1 |
+------+------+
1 row in set (0.00 sec)
2018-01-11
老師無私分享辛苦了, 請(qǐng)不必理會(huì)吹毛瑕疵網(wǎng)絡(luò)伸手黨。來找這些雞毛蒜皮的錯(cuò)誤的。情商很低
2017-12-23