usergrade表
1.找到里面username是null的行
SELECT * FROM usergrade WHERE ISNULL(USERNAME)
SELECT * FROM usergrade WHERE USERNAME IS NULL
2.找到里面username不是null的行
SELECT * FROM usergrade WHERE USERNAME IS NOT NULL
3.列出所有的行,并且将username是null的字段替换为lxy
SELECT IFNULL(USERNAME,‘lxy‘),GRADE FROM usergrade
IF(`apformId` IS NULL,0,1) hasPlan
如果apformId是null,选0,不是选1