Oracle copy column Value

Source: Internet
Author: User

Oracle copy column Value

Requirement: Add a field to an existing table in the test environment, and manually add data to this column of some data in the table, now you want to add this field in the formal environment and copy the existing values in the testing environment to the formal environment. Since the test environment and the formal environment have the same table structure but are not in the same database, the solution is:

1. Create a Database links in the test environment
2. Copy data using the following statement:

UPDATE ext_organinfo eop
SET eop. thumbnailmap = (SELECT eo. thumbnailmap
FROM ext_organinfo @ puam eo
WHERE eo. organ_id = eop. organ_id)
WHERE eop. organ_id IN (SELECT eo. organ_id
FROM ext_organinfo @ puam eo
WHERE eo. thumbnailmap is not null)

The process for creating a Database Links is as follows:

1. Right-click Database links in the left column of plsql, and create Database links as follows:

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.