在 PostgreSQL 中将一组行插入到 table
Insert a group of rows to a table in PostgreSQL
我有一个包含很多行的 table,我想创建一个新的 table 并在我的新 table 中复制一堆行(例如 30 行)。 ...
- table 名称是帐户(代码,code_activation,电子邮件,密码),我正在使用 PostgreSQL。
您可以使用插入命令:
INSERT INTO AccountCopy (SELECT code,code_activation,email,password FROM account LIMIT 30);
您可以放置一个 WHERE 子句和 select 您想要的那些行。 LIMIT n select a table.
的前 n 行
我有一个包含很多行的 table,我想创建一个新的 table 并在我的新 table 中复制一堆行(例如 30 行)。 ... - table 名称是帐户(代码,code_activation,电子邮件,密码),我正在使用 PostgreSQL。
您可以使用插入命令:
INSERT INTO AccountCopy (SELECT code,code_activation,email,password FROM account LIMIT 30);
您可以放置一个 WHERE 子句和 select 您想要的那些行。 LIMIT n select a table.
的前 n 行