PostgreSQL PGCES-02 PostgreSQL CE 8 Silver Exam Practice Test

Page: 1 / 14
Total 142 questions
Question 1

psql generated the following error message: psql: could not connect to server: Connection was refused Is the server running on host "server.example.com" and accepting TCP/IP connections on port 5432? Select two reasons that are NOT the cause of this error.



Answer : A, 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 : D


Question 3

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 correct result value. SELECT score FROM score ORDER BY gid DESC, score ASC LIMIT 1;



Answer : A


Question 4

The "sample" table consists of the following data:

How many rows are returned by executing the following SQL statement?

SELECT i FROM sample GROUP BY i HAVING count(*) = 2;



Answer : C


Question 5

The table "t1" is defined below. The column "id"

for table "t1" is of INTEGER type.

id | name ----

+-----------1 |

mammoth 2 |

tortoise 3 |

coelacanth

The following SQL statements were executed. Select the correct statement about the execution result. BEGIN; DECLARE c SCROLL CURSOR FOR SELECT name FROM t1 ORDER BY id;

MOVE FORWARD 2 FROM c; FETCH FORWARD ALL FROM c; COMMIT;



Answer : B


Question 6

Based on the relationship of columns within a table, select the most suitable description that shows that column A is dependent on column B.



Answer : B


Question 7

Select the most suitable statement about PostgreSQL from below.



Answer : C


Page:    1 / 14   
Total 142 questions