PostgreSQL PGCES-02 PostgreSQL CE 8 Silver Exam Practice Test

Page: 1 / 14
Total 142 questions
Question 1

Select two suitable statements regarding creating a new table.



Answer : B, E


Question 2

Given the following two table definitions, select one SQL statement which will cause an error. CREATE TABLE sample1 (id INTEGER, data TEXT); CREATE TABLE sample2 (id INTEGER);



Answer : E


Question 3

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



Answer : B, E


Question 4

Select two suitable statements regarding the pg_dump command.



Answer : C, E


Question 5

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



Answer : B


Question 6

Select two incorrect statements regarding 'DOMAIN'.



Answer : B, E


Question 7

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;



Answer : B


Page:    1 / 14   
Total 142 questions