在SELECT的时候,加入一列固定值

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"

在SELECT的时候,加入一列固定值

上一篇:Android NDK调试方式之一: adb logcat


下一篇:【转载】PHP性能优化干货