PostgreSQL_CE
PGCES-02 · Question #121
PostgreSQL CE PGCES-02 Exam A table and view are defined as follows: CREATE TABLE item (id INT, name TEXT, description TEXT); CREATE VIEW item_simple AS SELECT id, name FROM item; A set of SQL…
The correct answer is B. An error is generated at the point the INSERT statement is executed. See the full explanation below for the reasoning.
Question
PostgreSQL CE PGCES-02 Exam A table and view are defined as follows:
CREATE TABLE item (id INT, name TEXT, description TEXT); CREATE VIEW item_simple AS SELECT id, name FROM item; A set of SQL statements were executed in the order below. Select the most appropriate statement concerning the execution results. BEGIN; SELECT * FROM item_simple; INSERT INTO item_simple VALUES (1, 'item_name_1'); UPDATE item_simple SET name = 'item_name_2' WHERE id = 1; DELETE FROM item_simple; END;
Options
- AAn error is generated at the point the SELECT statement is executed.
- BAn error is generated at the point the INSERT statement is executed.
- CAn error is generated at the point the UPDATE statement is executed.
- DAn error is generated at the point the DELETE statement is executed.
- ENo error is generated.
How the community answered
(27 responses)- A11% (3)
- B78% (21)
- D7% (2)
- E4% (1)
Community Discussion
No community discussion yet for this question.