case用法示例
select id,userid,case title when 'test_title_2' then userid+1 else userid+10 end from article;
从article(id,userid,article,content)表中将标题为‘test_title_2’的记录其userid+1,其他的记录userid+10
coalesce用法示例:
对article表中的记录返回第一个不为null的列值。select coalesce(*) from article;