Free PGCES-02 Exam Braindumps (page: 16)

Page 15 of 36

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;

  1. 1 row
  2. 2 rows
  3. 3 rows
  4. 4 rows
  5. 5 rows

Answer(s): C



The tables "t1" and "t2" are defined below.
Tables "t1" and "t2" have columns "id" that are of INTEGER type, and columns "name" that are of TEXT type.
t1
t2
The following SQL command was executed. Select the number of rows in the result. SELECT * FROM t1 RIGHT OUTER JOIN t2 ON t1.id = t2.id;

  1. 2 rows
  2. 3 rows
  3. 4 rows
  4. 5 rows
  5. 6 rows

Answer(s): B



Select the SQL command that must be executed prior to executing the EXECUTE command.

  1. CREATE FUNCTION
  2. PREPARE
  3. DECLARE
  4. LOAD
  5. ALLOCATE

Answer(s): B



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);

  1. SELECT s1.id FROM sample1 s1;
  2. SELECT s1.id FROM sample1 AS s1;
  3. SELECT data FROM sample1 AS s1, sample2 AS s2
    WHERE s1.id = 1 AND s2.id = 2;
  4. SELECT id, data FROM sample1 AS s1, sample2 AS s2
    WHERE s1.id = s2.id;
  5. SELECT s1.id, s1.data FROM sample1 AS s1, sample2 AS s2
    WHERE s1.id = s2.id;

Answer(s): D






Post your Comments and Discuss Postgresql PGCES-02 exam with other Community members:

PGCES-02 Exam Discussions & Posts