nerdexam
PostgreSQL_CE

PGCES-02 · Question #96

PGCES-02 Question #96: Real Exam Question with Answer & Explanation

The correct answer is E. SELECT s1.id, s2.data FROM sample1 s1, sample2 s2;. See the full explanation below for the reasoning.

Question

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

Options

  • ASELECT id AS data, data FROM sample1;
  • BSELECT id, id FROM sample1;
  • CSELECT s1.id, s2.idFROM sample1 AS s1, sample1 AS s2;
  • DSELECT s1.id, s2.idFROM sample1 s1, sample2 s2;
  • ESELECT s1.id, s2.data FROM sample1 s1, sample2 s2;

Community Discussion

No community discussion yet for this question.

Full PGCES-02 Practice