MultipleChoice
Table 't1' is defined below. Table 't1' has a column 'id' of type INTEGER, and a column 'name' of type TEXT. t1: The following SQL is executed while client 'A' is connected. BEGIN;
SELECT * FROM t1 WHERE id = 2 FOR UPDATE; SELECT * FROM t1 WHERE id = 1 FOR UPDATE; -- (*) While the second 'SELECT' statement, shown with (*), is being executed, a separate client 'B' connects and executes the following SQL. Select the correct statement about the execution results. UPDATE t1 SET name = 'turtle' WHERE id = 2; Note: the default transaction isolation level is set to 'read committed'.
OptionsMultipleChoice
The 'sample' table consists of the following data: How many rows are returned by executing the following SQL statement? SELECT DISTINCT ON (data) * FROM sample;
OptionsMultipleChoice
Table 't1' is defined as follows: CREATE TABLE t1 (value VARCHAR(5)); A set of SQL statements were executed in the following order. Select the number of rows that table 't1' has after execution. BEGIN; INSERT INTO t1 VALUES ('AA'); SAVEPOINT point1; INSERT INTO t1 VALUES ('BB'); SAVEPOINT point2; INSERT INTO t1 VALUES ('CC'); ROLLBACK TO point1; INSERT INTO t1 VALUES ('DD'); END;
Options