Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 0d 20h 3m 17s Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

PostgreSQL Exam PGCES-02 Topic 4 Question 40 Discussion

Actual exam question for PostgreSQL's PGCES-02 exam
Question #: 40
Topic #: 4
[All PGCES-02 Questions]

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;

Show Suggested Answer Hide Answer
Suggested Answer: A, D

Contribute your Thoughts:

Sherill
11 days ago
Haha, this is a classic case of 'off-by-one' error. The 'INSERT' statement is missing the column names, so option C is the right answer. Better double-check your SQL, folks!
upvoted 0 times
...
Sherron
16 days ago
Wait, 'CREATE TABLE log_01 () INHERITS (log);'? Isn't that supposed to be 'CREATE TABLE log_01 INHERITS (log);'? I think option B is the correct answer here.
upvoted 0 times
...
Lorrine
17 days ago
I'm not sure, but I think the INSERT statement might cause an error.
upvoted 0 times
...
Jade
18 days ago
I agree with Elden, the SELECT statement should return 1 row.
upvoted 0 times
...
Kelvin
19 days ago
The 'CREATE TABLE log_01 () INHERITS (log);' statement looks good to me. The 'SELECT * FROM log;' should return the row we just inserted, so I'm going with option E.
upvoted 0 times
...
Elden
1 months ago
I think the correct answer is E.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77