Free PGCES-02 Practice Test Questions and Answers (2026)

View Mode
Q: 1
The table "custom" is defined below. The "id" column and "introducer" column are of INTEGER type, and the "email" column is of TEXT type. id | email | introducer ---- +-----------------+-----------2 | [email protected] | 1 3 | [email protected] | 2 4 | [email protected] | 2 Three SQL statements were executed in the following order: INSERT INTO custom SELECT max(id) + 1, '[email protected]', 4 FROM custom; UPDATE custom SET introducer = 999 WHERE email = '[email protected]'; DELETE FROM custom WHERE introducer NOT IN (SELECT id FROM custom); Select the number of rows in the "custom" table after the execution.
Options
Q: 2
Select two incorrect statements regarding 'DOMAIN'.
Options
Q: 3
Select the correct result generated by execution of the following SQL statements: CREATE TABLE log (id int, message TEXT, logtime TIMESTAMP); CREATE TABLE log_01 () INHERITS (log); INSERT INTO log_01 VALUES (1, 'error', CURRENT_TIMESTAMP); SELECT * FROM log;
Options
Q: 4
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 ('A'); SAVEPOINT sp; INSERT INTO t1 VALUES ('B'); ROLLBACK TO sp; INSERT INTO t1 VALUES ('C'); COMMIT;
Options
Q: 5
I would like to restore the database cluster from the "db1.dump" backup file. Select the correct command from below. (Note: "postgres" is the superuser)
Options
Q: 6
Select two suitable statements regarding the pg_dump command.
Options
Q: 7
Select the correct SQL statement which concatenates strings 'ABC' and 'abc' to form 'ABCabc'.
Options
Q: 8
I would like to insert the contents of the text file users.dat into the table t1 using psql. Contents of text file users.dat: Definition of table t1: CREATE TABLE t1 (uname TEXT, pass TEXT, id INTEGER); Select the most appropriate input from those below.
Options
Q: 9
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;
Options
Q: 10
Select the correct command to collect and save the statistical information of a table.
Options
Question 1 of 20

Premium Access Includes

  • Quiz Simulator
  • Exam Mode
  • Progress Tracking
  • Question Saving
  • Flash Cards
  • Drag & Drops
  • 3 Months Access
  • PDF Downloads
Get Premium Access
Scroll to Top

FLASH OFFER

Days
Hours
Minutes
Seconds

avail 10% DISCOUNT on YOUR PURCHASE