I want to move table from one schema to another schema in mysql , can anybody tell me how can I do this .
To change the schema of a table by using SQL Server Management Studio, in Object Explorer, right-click on the table and then click Design. Press F4 to open the Properties window. In the Schema box, select a new schema.
right click on table >> Table>>COPY>> select the schema where you want to copy.
Copy a table from one database to another. In MySQL, the easiest way to copy a table with its data between two databases is to use the CREATE TABLE AS statement, but note, that you need to provide the target database name as a table prefix. CREATE TABLE new-database-name. new-table-name AS SELECT * FROM old-database.
If both schema is on same server then Alter table can be used to move tables from one db to another.
alter table old_db.fooTable rename new_db.fooTable
Moving tables with space characters in between should be enclosed.
Example:
ALTER TABLE `schema1`.`tbl somename`
RENAME TO `schema2`.`tbl somename` ;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With