Connecting multiple oracle database table records to union

Source: Internet
Author: User
CREATEORREPLACEVIEWUIA. struct (SELECTt1.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_userfromtabFROMuia

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
(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 );

The fromtab field is a static value.

UNION join

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.