PostgreSQL CE 8 Silver PGCES-02 Exam Practice Test

Page: 1 / 14
Total 142 questions
Question 1

A sequence has the following definition: CREATE SEQUENCE seq1 CACHE 10 CYCLE; Select the value that is returned by executing the following SQL. SELECT nextval('seq1');



Answer : B


Question 2

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.



Answer : C


Question 3

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



Answer : E


Question 4

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;



Answer : A


Question 5

Select the most appropriate statement about the initdb command.



Answer : A


Question 6

What does the following command do? Select the correct description from below.

Note: "text=#" is the command prompt for psql. test=# ANALYZE foo;



Answer : B


Question 7

Select the most suitable statement about the creation of a new database.



Answer : E


Page:    1 / 14   
Total 142 questions