4 ms·
Can you really run updates on CTEs that are simple projections and selections? TIL.
by orthoxerox 3y ago
Can you really run updates on CTEs that are simple projections and selections? TIL.
- williamdclt 3y agoNo, you run a SELECT … LIMIT in a CTE, and the main query is an UPDATE … JOIN CTE ON mytable.id = CTE.id
- ElongatedMusket 3y agoBut using a Common Table Expression is a workaround, kind of like using a paper towel as a plate. Just give us a plate...
- williamdclt 3y agoCompletely agree, I’d like a LIMIT on UPDATE too