sql语句: select * from topic where title+content+tag+ like '%寒%' or
title+content+tag+ like '%波%' or title+content+tag+ like '%功%'
查询文章表‘标题’或‘内容’或‘tag’或‘’中出现‘寒’或‘波’或‘功’的文章列表。
但tag字段有可能为空 。如果tag=null,则title+content+tag+也为null.则搜索不能达到想要的结果。怎么处理这个可能为空的列?
调试欢乐多
title+content+tag+ 改成
isnull(title,'')+isnull(content,'')+isnull(tag,'')+isnull(,'')