select coalesce(title,'liu') from a;
mysql中可以用 help coalesce
http://dev.mysql.com/doc/refman/5.1/en/comparison-operators.html#function_coalesce
性能测试 两万以内(一万为空,一万不为空)的数据和取出值再判断是否为null给默认值稍高,而且写法方便
select coalesce(title,'liu') from a;
mysql中可以用 help coalesce
http://dev.mysql.com/doc/refman/5.1/en/comparison-operators.html#function_coalesce
性能测试 两万以内(一万为空,一万不为空)的数据和取出值再判断是否为null给默认值稍高,而且写法方便