MySQL笔记(1)
目录
4.MySql limit 与 limit offset 的区别
1.判断字段是否为NULL
select * from table where column is not null;
2.根据号码左7位判断用户归属地
SELECT
m.province 所在城市,
COUNT(u.user_id) 所在城市人数
FROM
xx_user u
LEFT JOIN mobile m ON m.phone =LEFT(u.real_phone, 7)