select * from (
select id,name
from a
union all
select cid,title
from b
) t
where name like '%key%'
order by id
limit 100,10
------解决方案--------------------
------解决方案--------------------
SQL code
select * from (
select id,name
from a
union all
select cid,title
from b)r
where name like '%KEY%'
order by id
limit 100,10;