将 SQLite 的 INSERT INTO 与 SELECT 查询一起使用时是否存在行限制?
Is there a row limit when using a SQLite's INSERT INTO with SELECT query?
我正在将一个数据库 (B) 附加到另一个数据库 (A) 并尝试通过执行以下操作在 A 中填充一个空的 table:
INSERT INTO table SELECT * FROM B.table
SQLite's documentation 提到了这一点,但它没有提到对 SELECT 语句返回的行数的任何限制(或在此特定情况下可由 INSERT 语句处理)。
此行数是否有任何限制,或者我是否可以假设确实会插入 SELECT 查询返回的所有行?
(请注意,我不是在寻找复制数据的替代方法,我真的只是想知道我是否会在这里遇到任何意想不到的限制)
没有限制,不包括SQLite的一般限制,可以在这个页面看到:https://www.sqlite.org/limits.html,例如:
The theoretical maximum number of rows in a table is 2^64 (18446744073709551616 or about 1.8e+19). This limit is unreachable since the maximum database size of 140 terabytes will be reached first. A 140 terabytes database can hold no more than approximately 1e+13 rows, and then only if there are no indices and if each row contains very little data.
并且由于您是从 SQLite table 获取行,因此没有实际限制。
我正在将一个数据库 (B) 附加到另一个数据库 (A) 并尝试通过执行以下操作在 A 中填充一个空的 table:
INSERT INTO table SELECT * FROM B.table
SQLite's documentation 提到了这一点,但它没有提到对 SELECT 语句返回的行数的任何限制(或在此特定情况下可由 INSERT 语句处理)。
此行数是否有任何限制,或者我是否可以假设确实会插入 SELECT 查询返回的所有行? (请注意,我不是在寻找复制数据的替代方法,我真的只是想知道我是否会在这里遇到任何意想不到的限制)
没有限制,不包括SQLite的一般限制,可以在这个页面看到:https://www.sqlite.org/limits.html,例如:
The theoretical maximum number of rows in a table is 2^64 (18446744073709551616 or about 1.8e+19). This limit is unreachable since the maximum database size of 140 terabytes will be reached first. A 140 terabytes database can hold no more than approximately 1e+13 rows, and then only if there are no indices and if each row contains very little data.
并且由于您是从 SQLite table 获取行,因此没有实际限制。