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: