Postgresql PGCES-02 Exam
PGCES-02 PostgreSQL CE 8 Silver (Page 4 )

Updated On: 7-Feb-2026

Select the correct SQL statement which concatenates strings 'ABC' and 'abc' to form 'ABCabc'.

  1. SELECT 'ABC' . 'abc';
  2. SELECT cat('ABC', 'abc') FROM pg_operator;
  3. SELECT 'ABC' + 'abc';
  4. SELECT 'ABC' + 'abc' FROM pg_operator;
  5. SELECT 'ABC' || 'abc';

Answer(s): E



Select two correct descriptions about views.

  1. A view is created by 'DECLARE VIEW', and deleted by 'DROP VIEW'.
  2. A view is a virtual table which does not exist.
  3. A view is created to simplify complicated queries.
  4. You can create a view with the same name as already existing tables.
  5. A view only exists while the postmaster is running, and is deleted when the postmaster stops.

Answer(s): B,C



Table "t1" is defined below.
Table "t1" has a column "id" of type INTEGER, and a column "name" of type TEXT.
t1:
The following SQL is executed while client "A" is connected. BEGIN;
SELECT * FROM t1 WHERE id = 2 FOR UPDATE;
SELECT * FROM t1 WHERE id = 1 FOR UPDATE; -- (*)
While the second 'SELECT' statement, shown with (*), is being executed, a separate client "B" connects and executes the following SQL.
Select the correct statement about the execution results.
UPDATE t1 SET name = 'turtle' WHERE id = 2;
Note: the default transaction isolation level is set to "read committed".

  1. The update process for client "B" is blocked until the current connection for client "A" is
    finished.
  2. The update process for client "B" is blocked until the current transaction for client "A" is
    finished.
  3. The 'UPDATE' process for client "B" proceeds regardless of the condition of client "A".
  4. The process of client "B" immediately generates an error.
  5. The processes for both clients are blocked, and an error stating that a deadlock has been
    detected is generated.

Answer(s): B



SQL statements were executed in the following order:
CREATE TABLE fmaster
(id INTEGER PRIMARY KEY, name TEXT);
CREATE TABLE ftrans
(id INTEGER REFERENCES fmaster (id), stat INTEGER, date DATE);
INSERT INTO fmaster VALUES (1, 'itemA');
INSERT INTO ftrans VALUES (1, 1, CURRENT_DATE);
Select two SQL statements that will generate an error when executed next.

  1. INSERT INTO ftrans VALUES (1, 1, CURRENT_DATE);
  2. INSERT INTO ftrans VALUES (2, 1, '2007-07-07');
  3. UPDATE fmaster SET name = 'itemAX' WHERE id = 1;
  4. UPDATE fmaster SET id = 100 WHERE id = 1;
  5. UPDATE ftrans SET id = 200 WHERE id = 1;

Answer(s): A,C



Select three SQL statements which return NULL.

  1. SELECT 0 = NULL;
  2. SELECT NULL != NULL;
  3. SELECT NULL IS NULL;
  4. SELECT NULL;
  5. SELECT 'null'::TEXT;

Answer(s): A,B,D



Viewing page 4 of 30
Viewing questions 16 - 20 out of 142 questions



Post your Comments and Discuss Postgresql PGCES-02 exam prep with other Community members:

Join the PGCES-02 Discussion