我有两个名为
的表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;
有人会帮我解决这个错误吗?
答案 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;