大概有一个直接而简单的解决方案。我想创建 10000 个新行 - 这些行按顺序编号,每行没有数据(按顺序编号的 id 除外)。我用过了:
INSERT INTO bins (id) VALUES (1)
创建 ID 为“1”的单行
如何创建具有相应 ID 号的 10000 行?
版本:PostgreSQL 9.5.5
postgresql postgresql-9.5
postgresql ×1
postgresql-9.5 ×1