1

I want to export the selected records into the text file.

Using:

\COPY (SELECT * FROM Table_Name) TO '/root/Exported_Data.txt'

Note: The above script just giving me same records, BUT NOT appending any duplicate or non duplicate records.

1 Answer 1

1

Following link might help in appending data to a file using copy command:
https://dba.stackexchange.com/questions/149745/copy-command-in-postgresql-to-append-data/149774#149774

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.