简体   繁体   中英

Postgresql database backup within tables

Is there any way to create a backup of particular row within a table in postgresql?

COPY (SELECT * FROM mytable WHERE id = 42)
TO STDOUT (FORMAT 'csv');

You can also just backup data to another table with:

create table backup as select * from mytable where id=24;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM