Answers for "postgresql delete last n rows"

SQL
4

postgres delete last row

DELETE FROM my_table WHERE my_col_id = (SELECT MAX(my_col_id) FROM my_table);
Posted by: Guest on June-20-2021
0

postgresql delete limit

DELETE FROM logtable
WHERE ctid IN (
    SELECT ctid
    FROM logtable
    ORDER BY timestamp
    LIMIT 10
)
Posted by: Guest on November-16-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language