=的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