nerdexam
PostgreSQL_CE

PGCES-02 · Question #43

Select two incorrect descriptions regarding the following SQL statements. CREATE TABLE cities ( name text, population float ); CREATE TABLE capitals ( state char(2) ) INHERITS (cities);

The correct answer is C. Searching "capitals" also searches rows in "cities". E. The second SQL statement results in an error, since the 'INHERITS' keyword is no longer. See the full explanation below for the reasoning.

Question

Select two incorrect descriptions regarding the following SQL statements. CREATE TABLE cities ( name text, population float ); CREATE TABLE capitals ( state char(2) ) INHERITS (cities);

Options

  • ADefines the tables called "cities" and "capitals".
  • B"capitals" inherits "cities".
  • CSearching "capitals" also searches rows in "cities".
  • DThe columns "name" and "population" are also defined in "capitals".
  • EThe second SQL statement results in an error, since the 'INHERITS' keyword is no longer

How the community answered

(23 responses)
  • A
    17% (4)
  • B
    4% (1)
  • C
    74% (17)
  • D
    4% (1)

Community Discussion

No community discussion yet for this question.

Full PGCES-02 Practice