1。单独显示,非所有数据表显示;distinct单独显示之炒用;
> select distinct purchase from goods order by id asc;
2。算术运算
SELECT ITEM WHOLESALE WHOLESALE +0.15 FROM PRICE;
3。IS与=
SELECT * FROM PRICE WHERE WHOLESALE IS NULL;
SELECT * FROM PRICE WHERE WHOLESALE =NULL;(不对)
3。SQL> SELECT *
FROM VACATION
WHERE LASTNAME NOT LIKE 'B%';
4。as与 空起不写,起个别名的妙用。
5。HAVING 子句时我们总是同时使用GROUP BY 子句
提高MYSQL效率的几个方法:
1。or or与in可以代替
2.between and 与<>