Home » SQL & PL/SQL » SQL & PL/SQL » how to insert data multiple bases using the multiple database links? (windows xp)
|
|
|
|
| Re: how to insert data multiple bases using the multiple database links? [message #573752 is a reply to message #573744] |
Thu, 03 January 2013 00:18   |
 |
Littlefoot
Messages: 16980 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
I guess you'll do that using multiple INSERT statements, such as
insert into table@db_link_1 (col1, col2, ..., coln) select col1, col2, ..., coln from source_table;
insert into table@db_link_2 (col1, col2, ..., coln) select col1, col2, ..., coln from source_table;
...
insert into table@db_link_n (col1, col2, ..., coln) select col1, col2, ..., coln from source_table;
|
|
|
|
| Re: how to insert data multiple bases using the multiple database links? [message #573756 is a reply to message #573752] |
Thu, 03 January 2013 00:50   |
 |
Michel Cadot
Messages: 54195 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
or:
insert all
into table@db_link_1 (col1, col2, ..., coln) values (col1, col2, ..., coln)
into table@db_link_2 (col1, col2, ..., coln) values (col1, col2, ..., coln)
...
into table@db_link_n (col1, col2, ..., coln) values (col1, col2, ..., coln)
select col1, col2, ..., coln from source_table;
Regards
Michel
|
|
|
|
| Re: how to insert data multiple bases using the multiple database links? [message #573759 is a reply to message #573756] |
Thu, 03 January 2013 01:04  |
 |
Littlefoot
Messages: 16980 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
VALUES is optional, so it can be shortened to
insert all
into table@db_link_1 (col1, col2, ..., coln)
into table@db_link_2 (col1, col2, ..., coln)
...
into table@db_link_n (col1, col2, ..., coln)
select col1, col2, ..., coln from source_table;
|
|
|
|
Goto Forum:
Current Time: Wed May 22 20:49:30 CDT 2013
Total time taken to generate the page: 0.13711 seconds
|