网站的整站搜索SQL语句怎样写?
比如我有:products表,news表,about表,case表等等,输入关键字后,怎么写SQL语句?
[最优解释]
select col from products where col like '%关键字%'
union all
select col from news where col like '%关键字%'
union all
select col from about where col like '%关键字%'
union all
select col from case where col like '%关键字%'