[英]How to insert all data from one schema to another schema by MySQL queries?
我想將所有數據從一個模式 (a) 復制到另一個 (b)。 兩個模式具有相同的結構。
我用
Insert into a.table1 select * from b.table1;
但是 a 中有 254 個表,列出它們非常令人沮喪。
你有更好的解決方案嗎?
謝謝
2個選項...
1)使用動態SQL循環遍歷結果:
select TABLE_NAME from information_schema.tables
2) 將該查詢的結果輸出到 excel 中,從中構建您的插入,然后在一個大的舊 proc 中運行它們。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.