The table "custom" is defined below. The "id" column and "introducer" column are of INTEGER type, and the "email" column is of TEXT type. id | email | introducer----+-----------------+------------2 | aaa@example.com | 1 3 | bbb@example.com | 2 4 | ccc@example.com | 2 Three SQL statements were executed in the following order: INSERT INTO custom SELECT max(id) + 1, 'ddd@example.com', 4 FROM custom; UPDATE custom SET introducer = 999 WHERE email = 'bbb@example.com'; DELETE FROM custom WHERE introducer NOT IN (SELECT id FROM custom); Select the number of rows in the "custom" table after the execution.
Answer(s): C
The "sample" table consists of the following data: How many rows are returned by executing the following SQL statement? SELECT * FROM sample WHERE v ~ 'ab';
Select an incorrect statement regarding the following SQL statement. Note that "user_view" is a view. CREATE OR REPLACE RULE rule_1 AS ON UPDATE TO user_view DO INSTEAD NOTHING;
Answer(s): D
The "animal" table consists of the following data: Select the correct result returned by executing the following SQL statement: SELECT name FROM animal ORDER BY weight DESC LIMIT 2 OFFSET 1;
Answer(s): A
Four SQL statements were executed in the following order. CREATE TABLE foo (bar INT); ALTER TABLE foo ALTER bar TYPE BIGINT; ALTER TABLE foo ADD baz VARCHAR(5); ALTER TABLE foo DROP bar; Select two SQL statements that generate an error when executed.
Answer(s): B,D
Post your Comments and Discuss Postgresql PGCES-02 exam prep with other Community members: