Sql – How to move table data from one environment to another environment in Oracle


I am a novice Oracle User.
I want to move a table records from QA to Test environment. The table already exists in Test. Would it be something like this ?

insert into wKTest01.MyTableIWantToMove select * from wkQA01.MyTableIWantToMove ; 

Any help is greatly appreciated.
Both the tables in both environments have same number of columns with same data types.

Best Solution

You can use database links in Oracle to do this.Create a database link in your test database called myQADBLink which points to your QA DB.

The code would look something like this

CREATE DATABASE LINK myQADBLink CONNECT TO <username> identified by
<password> USING
'<QA DBconnect string>';

SELECT 1 FROM dual@myQADBLink; -- This is to test if your dblink is created properly.

Now you can copy from QA to test by saying

INSERT INTO wKTest01.MyTableIWantToMove select * from wkQA01.MyTableIWantToMove@myQADBLink;