Immutable solution version
How to delete a few rows via SQL?
Complete solution
In QuestDb Update and Delete statement are not supported.
In QuestDb Update and Delete statement are not supported. At least now. The ways to delete data are: - Drop a partition - Write a copy of the table without the rows you want to delete, drop table and then rename the table to the one you wanted. Something like Create table mytablecopy AS ( SELECT * FROM mytable where columnvalue != 2 ) Timstamp(...) PARTITION BY ...; DROP TABLE mytable; RENAME table mytablecopy TO mytable; These are costly workarounds for exceptional cases.
Context: Stack Overflow #65976247 (accepted answer, 10 votes): is there a way to delete a view rows matching a query in QuestDB? I can't find any statement allowing me that. This would be the best option: delete from mytable where columnvalue==2; Thanks!
Evidence
Source: Stack Overflow #65976247 (accepted answer, 10 votes): is there a way to delete a view rows matching a query in QuestDB? I can't find any statement allowing me that. This would be the best option: delete from mytable where columnvalue==2; Thanks!
Verified resolution: In QuestDb Update and Delete statement are not supported. At least now. The ways to delete data are: - Drop a partition - Write a copy of the table without the rows you want to delete, drop table and then rename the table to the one you wanted. Something like Create table mytablecopy AS ( SELECT * FROM mytable where columnvalue != 2 ) Timstamp(...) PARTITION BY ...; DROP TABLE mytable; RENAME table mytablecopy TO mytable; These are costly workarounds for exceptional cases.
Source URL: https://stackoverflow.com/questions/65976247/how-to-delete-a-few-rows-via-sql
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Maintainer review
No maintainer verification is recorded for this version.
A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_tRYMuWVxWv8bjojxMT-n7w" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">How to delete a few rows via SQL? <span>— Vectle</span></a>