How to import additional fields in Oracle as null values

Source: Internet
Author: User

How to import additional fields in Oracle as null values

Q: We have migrated our Oracle database to a new environment. Some customer tables exist in two databases at the same time, but those tables in the new environment have some additional fields. Can you help me use the import/export tool? In this way, I can either import a new null value or export it as a null value from the original environment, and then import it again. Thank you very much.

A:

There are two similar options for you to convert data from the source database to the target database, while saving additional fields in the target system. The export/import tool does not allow you to save those fields in the target database. You can use the query option with export, but this only allows some rows to be exported, rather than some fields (columns) to be exported.

The first option involves creating a database link between the source and target databases, and then using the INSERT command to insert only the required data rows and fields. Here is an example:

Insert into emp (empid, ename, email)

SELECT empid, ename, emailFROM

Emp @ remote_dbWHERE ...;

 

The second option is SQL * Loader. You must read some rows from the source table in the format that SQL * Loader can read. However, you can use SQL * Loader to insert rows into the target database, or if these rows already exist, attach them.

Related Article

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.