select * from book where title like '%china%'
union
select * from book where content like '%china%'
如果表记录多的话,like会引起全表扫描,建议使用全文索引。
select * from book where charindex('china',title)>0
union all
select * from book where charindex('china',content)>0
select * from book where charindex('china',title)>0
or charindex('china',content)>0
order by charindex('china',title) desc