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

Updated On: 7-Feb-2026

The table "score" is defined as follows:

gid | score
-----+-------
1 | 70
1 | 60
2 | 100
3 | 80
3 | 50
The following query was executed. Select the number of rows in the result. SELECT gid, max(score) FROM score
GROUP BY gid HAVING max(score) > 60;

  1. 1 row
  2. 2 rows
  3. 3 rows
  4. 4 rows
  5. 5 rows

Answer(s): C



Table "t1" is defined as follows:
CREATE TABLE t1 (value VARCHAR(5));
A set of SQL statements were executed in the following order. Select the number of rows that
table "t1" has after execution.
BEGIN;
INSERT INTO t1 VALUES ('AA');
SAVEPOINT point1;
INSERT INTO t1 VALUES ('BB');
SAVEPOINT point2;
INSERT INTO t1 VALUES ('CC');
ROLLBACK TO point1;
INSERT INTO t1 VALUES ('DD');
END;

  1. 1 row
  2. 2 rows
  3. 3 rows
  4. 4 rows
  5. 0 rows

Answer(s): B



Select two suitable statements about sequences.

  1. A sequence always returns a 4-byte INTEGER type value, so the maximum value is 2147483647.
  2. A sequence is defined by 'CREATE SEQUENCE', and deleted by 'DROP SEQUENCE'.
  3. Although the "nextval" function is called during a transaction, it will have no effect if that
    transaction is rolled back.
  4. A sequence always generates 0 or consecutive positive numbers.
  5. A sequence number can be set by calling the "setval" function.

Answer(s): B,E



The "sample" table consists of the following data:
How many rows are returned by executing the following SQL statement? SELECT DISTINCT ON (data) * FROM sample;

  1. 2 rows
  2. 3 rows
  3. 4 rows
  4. 5 rows
  5. 6 rows

Answer(s): B



The following SQL statements were executed using psql.
Select the appropriate statement about the result.
LISTEN sign_v;
BEGIN;
NOTIFY sign_v;
COMMIT;
LISTEN sign_v;

  1. At the point that 'NOTIFY sign_v' is executed, a message that starts with "Asynchronous
    notification 'sign_v' received" is output.
  2. At the point that 'COMMIT' is executed, a message that starts with "Asynchronous notification
    'sign_v' received" is output.
  3. At the point that 'SELECT * FROM pg_user;" is executed, a message that starts with
    "Asynchronous notification 'sign_v' received" is output.
  4. When 'LISTEN sign_v' is executed for the second time, a message that starts with
    "Asynchronous notification 'sign_v' received" is output.
  5. The message "Asynchronous notification 'sign_v' received" is not received while in this
    connection.

Answer(s): B



Viewing page 3 of 30
Viewing questions 11 - 15 out of 142 questions



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

Join the PGCES-02 Discussion