PostgreSQL CE 8 Silver PGCES-02 Exam Questions

Page: 1 / 14
Total 142 questions
Question 1

In the "customer" table, you want to change the "email" values which have an "id" value of 10000 or less, to NULL. Select the correct SQL statement to achieve this task.



Answer : C


Question 2

Four SQL statements were executed in the following order.

CREATE TABLE foo (bar INT); ALTER TABLE foo ALTER bar

TYPE BIGINT; ALTER TABLE foo ADD baz VARCHAR(5);

ALTER TABLE foo DROP bar; Select two SQL statements that generate an error when executed.



Answer : B, D


Question 3

What phenomenon occurs if PostgreSQL is used without performing VACUUM ?

Select two appropriate descriptions from those below.



Answer : A, C


Question 4

Select two appropriate statements from below about the following SQL statements:

CREATE FUNCTION myfunc(INTEGER) RETURNS text LANGUAGE plpgsql STRICT AS '

DECLARE x ALIAS FOR $1; r text := ''default''; BEGIN IF x > 100 THEN SELECT INTO r data FROM mytable WHERE id = x; END IF; RETURN r; END;';



Answer : A, E


Question 5

Select the most appropriate statement about the initdb command.



Answer : A


Question 6

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 7

Select one incorrect statement about the command shown below.

Note: $ is the command prompt. $ dropuser -U admin foo



Answer : B


Page:    1 / 14   
Total 142 questions