数据库查询的重要条件判断:Case....When......用法
select E.Userid, CASE WHEN E.USERNAME IS NULL THEN '0' else E.USERNAME END USERNAME, CASE WHEN E.USERNAME IS NULL THEN '0' ELSE '1' END COMPARE from eep.users E