user1018926
user1018926

Reputation: 51

Select from one DB and insert in another DB

I need a sql query in which

Select from DB1 and insert into DB2 in one single query

Example: DB1 Select username,account_status from dba_users;

DB2 Insert into table User_id

Upvotes: 0

Views: 1227

Answers (1)

GolezTrol
GolezTrol

Reputation: 116110

You have to create a database link (this should probably be done by a DBA). Once that is in place, you can select from the other database and write a statement like this:

INSERT INTO MyTable
SELECT * from MyTable@DB2

[Edit]

You can't without a database link.

Upvotes: 2

Related Questions