Hiiiiii
There are two tables having the same name in two schemas......
I want add some rows from one table to another...........
Please suggest a sql query to perform that operation..........
You should use the [schema.]table_name model to do this.
For example:
If the name of the table is "myTable" and this table is located in Joe's schema
and the other in kanthi84 (AND the schema's are identical). you could
use a query like this to do a selective insert from joes table to yours -
insert into kanthi84.myTable
select columnName1, columnName2 from joe.myTable where columnName = 'unique_condition';
or insert all the rows from one table to the other
insert into kanthi84.myTable
select * from joe.myTable;
A couple of things to consider though:
1. You must have the select any table privilege to do this
2. If you're logged in as yourself you don't neccessarily have to prefix the
table with your name since it is implicitly presumed by ORACLE.
3. The example presumes that there are only 2 columns in both tables since the insert must contain the same number of values that both tables contain.
Hope this helps!