nerdexam
PostgreSQL_CE

PGCES-02 · Question #57

The following table called company is defined as follows: id | name ----+------------------ 1 | Pgsql,inc. 2 | Postgres Co.,Ltd 3 | SQL Company. Select the most appropriate psql command for…

The correct answer is C. \copycompany TO 'company.txt' DELIMITER ','. See the full explanation below for the reasoning.

Question

The following table called company is defined as follows:

id | name ----+------------------ 1 | Pgsql,inc. 2 | Postgres Co.,Ltd 3 | SQL Company. Select the most appropriate psql command for generating a text file company.txt with the following content on the client side. 1,Pgsql ,inc. 2,Postgres Co. ,Ltd 3,SQL Company.

Options

  • A\copycompany TO 'company.txt' WITH ',';
  • B\copycompany TO 'company.txt' WITH DELIMITER AS ',';
  • C\copycompany TO 'company.txt' DELIMITER ','
  • D\copycompany TO "company.txt"
  • E\copycompany TO company.txt CSV

How the community answered

(34 responses)
  • A
    12% (4)
  • B
    3% (1)
  • C
    79% (27)
  • E
    6% (2)

Community Discussion

No community discussion yet for this question.

Full PGCES-02 Practice