PostgreSQL 一句 SQL 实现删除数据后插入到历史表中
PostgreSQL About 182 wordswith 语句
with deleted_rows as (
delete from t_queue where id = '12345' returning *
)
insert into t_queue_history(id, create_ts, data)
select id, create_ts, data
from deleted_rows;
Views: 556 · Posted: 2024-06-29
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb/LiteNote扫描下方二维码关注公众号和小程序↓↓↓
Loading...