SELECT * FROM
(select
id id,
si_code code,
si_sharetype sharetype,
si_name name,
si_organid organid,
si_srvaddress address,
lastupddate uptime,
si_provider provider,
si_released released,
status status,
'interfsrv' as tableType
from t_rsdir_interfsrv
union ALL
select
id id,
di_code code,
di_sharetype sharetype,
di_name name,
di_organid organid,
di_dbaddress address,
lastupddate uptime,
di_provider provider,
di_released released,
status status,
'interfdata' as tableType
from t_rsdir_interfdata) t WHERE 1=1 AND t.status="Y"