我正在尝试从 Postgres 文档中重现此查询:
WITH moved_rows AS (
DELETE FROM products
WHERE
"date" >= '2010-10-01' AND
"date" < '2010-11-01'
RETURNING *
)
INSERT INTO products_log
SELECT * FROM moved_rows;
Korma 真的可以做到吗(当然,除了编写原始 SQL 之外)?我在文档中没有提到它。
谢谢...