#docslug#/oceanbase-database/oceanbase-database/V3.2.2/migrate-data-by-using-sql-scripts-1 This topic describes how to use SQL scripts to migrate data and resource units between tables.
Migrate data between tables
You can use the INSERT INTO......SELECT statement to synchronize data between tables.
The following statement inserts data from table_A to table_B:
INSERT INTO table_B
SELECT col1,col2 from table_A
WHERE [expr];
Migrate resource units
The following statement migrates a resource unit of the specified unit ID to the destination:
ALTER SYSTEM MIGRATE
UNIT = [unit_id] DESTINATION = [ip_port]
The following statement cancels a resource unit migration task:
obclient> ALTER SYSTEM CANCEL MIGRATE UNIT unit_id;