PostgreSQL_CE
PGCES-02 · Question #16
Select the correct result generated by execution of the following SQL statements: CREATE TABLE log (id int, message TEXT, logtime TIMESTAMP); CREATE TABLE log_01 () INHERITS (log); INSERT INTO…
The correct answer is E. 'SELECT' statement returns 1 row, and exits successfully. See the full explanation below for the reasoning.
Question
Select the correct result generated by execution of the following SQL statements:
CREATE TABLE log (id int, message TEXT, logtime TIMESTAMP); CREATE TABLE log_01 () INHERITS (log); INSERT INTO log_01 VALUES (1, 'error', CURRENT_TIMESTAMP); SELECT * FROM log;
Options
- AFirst 'CREATE TABLE' generates a syntax error.
- BSecond 'CREATE TABLE' generates a syntax error.
- C'INSERT' statement generates an error stating that the number of columns and values do not
- D'SELECT' statement returns 0 rows, and exits successfully.
- E'SELECT' statement returns 1 row, and exits successfully.
How the community answered
(16 responses)- B6% (1)
- C19% (3)
- D6% (1)
- E69% (11)
Community Discussion
No community discussion yet for this question.