Reputation: 51
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
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