Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 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:

Virgilio
16 days ago
I'm just going to go with option E and hope for the best. As long as it doesn't generate a syntax error, I'm happy. Who needs to understand the intricacies of table inheritance, anyway?
upvoted 0 times
...
Sherill
30 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
Laticia
13 days ago
Oops, looks like someone forgot to specify the column names in the INSERT statement.
upvoted 0 times
...
...
Sherron
1 months 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
Cornell
6 days ago
Yes, the second 'CREATE TABLE' statement should be 'CREATE TABLE log_01 INHERITS (log);'. Option B makes sense.
upvoted 0 times
...
Vincent
8 days ago
I agree, option B seems to be the correct answer.
upvoted 0 times
...
...
Lorrine
1 months ago
I'm not sure, but I think the INSERT statement might cause an error.
upvoted 0 times
...
Jade
1 months ago
I agree with Elden, the SELECT statement should return 1 row.
upvoted 0 times
...
Kelvin
1 months 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
2 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
a