Wieder was gelernt

Move rows to a different table

Tags: sql postgresql
2021-05-24
with rows_to_move as (
    delete from t
    where ts < '2021-05-24 14:22'
    returning *
)
insert into t_arch (select * from rows_to_move);