oracle数据库 多张表记录连接union
CREATE OR REPLACE VIEW UIA.VIEW_UIA_USER AS ( SELECT t1.ID,t1. USER_NAME ,t1.USER_PASS,t1.USER_IDCARD,t1.USER_ALIAS,t1.USER_EMAIL,t1.USER_STUDENTID,t1.USER_WORKERID,t1.USER_TYPE,t1.USER_PHONENUMBER,t1.USER_STATUS, uia_user fromtab FROM uia
CREATE OR REPLACE VIEW UIA.VIEW_UIA_USER AS
(SELECT t1."ID",t1."USER_NAME",t1."USER_PASS",t1."USER_IDCARD",t1."USER_ALIAS",t1."USER_EMAIL",t1."USER_STUDENTID",t1."USER_WORKERID",t1."USER_TYPE",t1."USER_PHONENUMBER",t1."USER_STATUS",'uia_user' fromtab FROM uia.uia_user t1
UNION
SELECT t2."ID",t2."USER_NAME",t2."USER_PASS",t2."USER_IDCARD",t2."USER_ALIAS",t2."USER_EMAIL",t2."USER_STUDENTID",t2."USER_WORKERID",t2."USER_TYPE",t2."USER_PHONENUMBER",t2."USER_STATUS",'uia_user_TEMP' fromtab FROM uia.uia_user_temp t2);
fromtab 字段是静态值
UNION 连接