Free PGCES-02 Exam Braindumps (page: 17)

Page 16 of 36

What happens if an SQL statement syntax error occurs while a transaction is running? Select the correct action from below.

  1. The transaction continues.
  2. The transaction is aborted and a new transaction is started automatically.
  3. The transaction is stopped and you cannot issue any SQL commands other than a command to end the transaction.
  4. The connection is terminated.
  5. The "postmaster" process is terminated.

Answer(s): C



The table "tbl" is defined below such that it could only store non-negative integers in the column
"nn".
Select the keyword that is applicable for the underlined blank.
CREATE _______ natural_number AS DECIMAL CHECK (VALUE >= 0); CREATE TABLE tbl(nn natural_number);

  1. VIEW
  2. SCHEMA
  3. RULE
  4. TYPE
  5. DOMAIN

Answer(s): E



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.

  1. UPDATE email = NULL FROM customer WHERE id <= 10000;
  2. UPDATE customer SET email IS NULL WHERE id < 10001;
  3. UPDATE customer SET email = NULL WHERE id <= 10000;
  4. DELETE FROM customer.email WHERE id < 10001;
  5. UPDATE FROM customer SET email = NULL WHERE id <= 10000;

Answer(s): C



Select one incorrect description regarding the following SQL statement defining a function.
CREATE OR REPLACE FUNCTION get_file_list(TEXT, BOOLEAN)
RETURNS SETOF TEXT LANGUAGE C STRICT
SECURITY DEFINER AS 'myfuncs.so';

  1. This function may be defined in 'myfuncs.so'.
  2. This function can return multiple rows.
  3. This SQL statement defines a function written in the C language.
  4. If this function is called with a NULL parameter, it will return 0 when executed.
  5. This function operates with the authority of the user who executed it.

Answer(s): E






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

PGCES-02 Exam Discussions & Posts