Suppose current schema name is : schema_A and under this schema I have a table name: myTableName. myTableName table is loaded with some records and I want to just change the schema of this table.
The command to do so (changing from schema_A to schema_B of a table: 'myTableName' )-
ALTER SCHEMA schema_B TRANSFER schema_A.myTableName ;
i.e.
ALTER SCHEMA <new_Schema_Name> TRANSFER <current_Schema_Name>.<tableName> ;


Anil KumarPosted May 11, 2012, 1:24 AM EDT
And thanks-a-lot for liking.
Anil KumarPosted May 11, 2012, 1:23 AM EDT
we can change the schema of all tables also by looping. I will write the same in my next Blog.
Lajapathy ArunPosted May 7, 2012, 7:25 PM EDT
Please post same type of SQL information which is very useful to learn. Thanks for your effort and nice concepts and looks new.
Lajapathy ArunPosted May 7, 2012, 7:24 PM EDT
If i want to change schema for all table in the database, then wha t is the syntax to be used?