sqlite 将数据从一张表复制到另一张表 [英] sqlite copy data from one table to another
本文介绍了sqlite 将数据从一张表复制到另一张表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
SQLITE
我有 2 个具有相同字段的表源"和目标".ID 和 COUNTRY,尽管它们也有其他不相同的字段.
I have 2 tables "Source" and "Destination" that have the same fields. ID and COUNTRY, though they both have other fields too that are not in common.
我需要将 Source.Country 值复制到 Destination.Country 中,该连接位于 ID 上
I need to copy the Source.Country value to the Destination.Country where the join is on ID
我这辈子都无法让 Sqlite 做到这一点.
For the life of me I can't make Sqlite do this.
在 SQL Server 等中,这是一项非常简单的任务.
In SQL Server etc this is a super simple task.
想法?
推荐答案
INSERT INTO Destination SELECT * FROM Source;
有关正式定义,请参阅 SQLite 所理解的 SQL:插入.
See SQL As Understood By SQLite: INSERT for a formal definition.
这篇关于sqlite 将数据从一张表复制到另一张表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文