limit 2,1 跳过两条,取出一条,即读取第三条数据
limit 2 offset 1 跳过一条,取出两条,即读取第2,3条
limit里面不能做运算
IFNULL(expression,alt_value) 如果第一个表达式expression为NULL,返回第二个参数的备用值
select IFNULL("hello","R") //hello
select IFNULL(NULL,"R") //R
过滤空值不能用 != NULL
使用 is NULL is not NULL
如过滤年龄为空的
SELECT device_id, gender, age, university
from user_profile
where age is not NULL;