=的ID我曾嘗試:創建表3 AS SELECT WHERE從表1從表2
CREATE TABLE temporary_bundle_wired
AS SELECT * FROM temporary_bundle,wired_items
WHERE temporary_bundle.id = wired_items.id;
我有兩個exisiting表:
temporary_bundle
wired_items
我想創建一個名爲temporary_bundle_wired
的第三個表。 在這個表我想從temporary_bundle WHERE temporary_bundle.id = wired_items.id
我也想從temporary_bundle
刪除這些記錄,一旦我讓他們搬進tempoary_bundle_wired
插入所有行(和它們的列和字段)。
查詢我已經試過回報:
duplicate column name Id
http://prntscr.com/gh1vfo。因此,對於查詢中的每一列我會做... AS SELECT a.id as'temporary_bundle.id','user_id','room_id'等等? – buuencrypted
是的。這是正確的 – sdsc81
CREATE TABLE temporary_bundle_wired AS SELECT a.id as'id','user_id','base_item','extra_data','x','y','z','rot','wall_pos','有限數量','有限容量','沙箱'從temporary_bundle a,wired_items b WHERE a.id = b.id; ...這沒有插入來自temporary_bundle的行,其中temporary_bundle.id = wired_items.id。它所做的只是這個http://prntscr.com/gh254q。我還需要填寫temporary_bundle中的相應字段。 – buuencrypted