標題:
關於 MYSQL COPY TABLE Command
發問:
關於 MYSQL COPY TABLE Command 怎樣把 MYSQL 資料庫ABC的 TABLE:ONE, TABLE:TWO, TABLE:THREE, COPY TO 資料庫ABC的 TABLE:TOTAL. thank a lot easy9756 更新: e.g. TABLE ONE COST CENTER C1 TABLE TWO COST CENTER C2 TABLE THREE COST CENTER C3 更新 2: e.g. TABLE ONE STRUCTURE COST CENTRE,ID,NAME. TABLE ONE RECORD C1, C1001, AAA C1, C1002, BBB TABLE TWO STRUCTURE COST CENTRE,ID,NAME. TABLE TWO RECORD C2, C2001, CCC C2, C2002, DDD TABLE THREE STRUCTURE COST CENTRE,ID,NAME. TABLE THREE RECORD C3, C3001, EEE C3, C3002, FFF
- samsung手機 sgh-f338-(+20)
- 阿媽要我寫成語, 每一句都要我用十二生肖之一個字, 你可以代筆嗎-_8
- 救我!!!F.4Certificate Maths~聽日交...Quadratic Function~@1@
此文章來自奇摩知識+如有不便請留言告知
最佳解答:
if "TOTAL" is a existing table and u want to insert all records from tables "ONE", "TWO", "THREE". ?u can use following SQL. INSERT into total (?cost_centre, id, name ) SELECT cost_centre, id, name FROM one? UNION ALL SELECT cost_centre, id, name FROM two? UNION ALL? SELECT cost_centre, id, name FROM three. If "TOTAL" isn't a existing table and u need to create it and?to insert all records from tables "ONE", "TWO", "THREE". ?u can use following SQL. CREATE TABLE total AS SELECT cost_centre, id, name FROM one? UNION ALL SELECT cost_centre, id, name FROM two UNION ALL? SELECT cost_centre, id, name FROM three.
其他解答:
留言列表