将数据从一个表复制到另一个表sqlite时出错

时间:2015-08-10 13:10:06

标签: mysql sqlite

我有两个名为

的表
state_master
location_master_state_master

您好我想将数据从一个表复制到另一个表但我收到以下错误

SQLiteManager: Likely SQL syntax error: INSERT INTO state_master(id, create_uid, code, create _date, name, write_uid, write_date) SELECT id, create_uid, code, create_date, name, write_uid, write_date FROM location_master_state_master; [ near "create": syntax error ]
Exception Name: NS_ERROR_FAILURE
执行以下查询时

INSERT INTO state_master(id, create_uid, code, create _date, name, write_uid, write_date) SELECT id, create_uid, code, create_date, name, write_uid, write_date FROM location_master_state_master;

有人会帮我解决这个错误吗?

1 个答案:

答案 0 :(得分:1)

create_date之间有一个空格,应该是create_date

INSERT INTO state_master(id, create_uid, code, create_date, name, write_uid, write_date) SELECT id, create_uid, code, create_date, name, write_uid, write_date FROM location_master_state_master;