SQLite INSERT SELECT 查询结果到现有表中? [英] SQLite INSERT SELECT Query Results into Existing Table?
问题描述
我以前没有使用过 SQLite,但我正在摸索它.我需要将选择查询的结果插入到现有表中,但即使经过一些冗长的网络阅读,我仍然无法完成这个简单的任务.我正在使用 SQLite Studio 来管理我的数据库,他们的网站建议了一种这样做的方法,但它似乎不起作用,因为 SQLite Studio 会抛出接近插入":语法错误.有人可以帮助我或请指出正确的语法方向.
I've not used SQLite before but I'm muddling my way through it. I need to Insert the results from a select query into a existing table but even after some lengthy web reading I'm still failing to complete this simple task. I'm using SQLite Studio to manage my database, their web site suggests a method of doing this but it doesn't appear to work as SQLite Studio will throw up "near "INSERT": syntax erros. Could some one please help me or point me in the direction of the correct syntax for this please.
谢谢本
推荐答案
参考.
正确的语法是:
insert into table_name select whatever...
这篇关于SQLite INSERT SELECT 查询结果到现有表中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!