Details
-
Type:
Task
-
Status: Open
-
Priority:
Major
-
Resolution: Unresolved
-
Fix Version/s: 10.2
-
Component/s: Data Manipulation - Subquery, Parser
-
Labels:None
Description
It would be great if MariaDB supported SQL standard Common Table Expressions (CTEs).
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;
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
I spoke to D. Richard Hipp (creator of SQLite), and he too would like to see CTE support. We kind of have some of the parts to make this work – virtual columns, DELETE ... RETURNING.