我正在尝试此查询,但无法正常工作
INSERT INTO single_user (location_home.id_location_home )
SELECT location_home.id_location_home
WHERE location_home.location = 'London'
任何帮助?
错误:
for the right syntax to use near 'WHERE location_home.location = 'London'' at line 3
感谢
答案 0 :(得分:2)
你错过了一个FROM条款。
此外,请在将来显示错误,以便我们更好地诊断问题
答案 1 :(得分:0)
INSERT INTO single_user (location_home.id_location_home )
SELECT location_home.id_location_home
FROM some_table
WHERE location_home.location = 'London'
你忘记了FROM条款。