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, 5:24 AM
And thanks-a-lot for liking.
Anil KumarPosted May 11, 2012, 5:23 AM
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, 11:25 PM
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, 11:24 PM
If i want to change schema for all table in the database, then wha t is the syntax to be used?