New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Free PostgreSQL PGCES-02 Exam Dumps - Page 2

Question No: 11

MultipleChoice

There is a table 'tb1' that has a column 'c1' defined as type TEXT. The following SQL is executed while client 'A' is connected. BEGIN; LOCK TABLE tb1 IN ACCESS EXCLUSIVE MODE; SELECT * FROM tb1; While the above 'SELECT' statement is being executed, client 'B' connects to the same database and executes the following SQL. Select two correct statements describing the behavior of PostgreSQL. INSERT INTO tb1 (c1) VALUES ('new line'); Note: the default transaction isolation level is set to 'read committed'.

Options
Question No: 12

MultipleChoice

The tables 't1' and 't2' are defined below. The tables 't1' and 't2' have columns 'id' which are type of INTEGER and column 'name's which are type of TEXT. t1 t2 The following SQL command was executed. Select the number of rows in the result. SELECT * FROM t1 NATURAL FULL OUTER JOIN t2;

Options
Question No: 13

MultipleChoice

The 'animal' table consists of the following data: Select the correct result returned by executing the following SQL statement: SELECT name FROM animal ORDER BY weight DESC LIMIT 2 OFFSET 1;

Options
Question No: 14

MultipleChoice

The 'sample' table consists of the following data: How many rows are returned by executing the following SQL statement? SELECT * FROM sample WHERE v ~ 'ab';

Options
Question No: 15

MultipleChoice

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 |

aaa@example.com | 1 3 |

bbb@example.com | 2 4 |

ccc@example.com | 2

Three SQL statements were executed in the following order:

INSERT INTO custom SELECT max(id) + 1, 'ddd@example.com', 4

FROM custom; UPDATE custom SET introducer = 999 WHERE email = 'bbb@example.com'; DELETE FROM custom WHERE introducer NOT IN (SELECT id FROM custom); Select the number of rows in the 'custom' table after the execution.

Options
Question No: 16

MultipleChoice

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'.

Options
Question No: 17

MultipleChoice

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;

Options
Question No: 18

MultipleChoice

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

Save Cancel