I would like to check the privileges on the "items" table in psql. Select the most appropriate command.
Answer : E
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 : B, D
PostgreSQL can use an index to access a table. Select two incorrect statements about indexes.
Answer : D, E
The table "tbl" is defined below such that it could only store non-negative integers in the column "nn". Select the keyword that is applicable for the underlined blank. CREATE _______ natural_number AS DECIMAL CHECK (VALUE >= 0); CREATE TABLE tbl(nn natural_number);
Answer : E
There is a table "tb1" that has a column "c1" defined as type TEXT. The following SQL is executed while client "A" is connected. BEGIN; LOCK TABLE tb1 IN ACCESS EXCLUSIVE MODE; SELECT * FROM tb1; While the above 'SELECT' statement is being executed, client "B" connects to the same database and executes the following SQL. Select two correct statements describing the behavior of PostgreSQL. INSERT INTO tb1 (c1) VALUES ('new line'); Note: the default transaction isolation level is set to "read committed".
Answer : B, E
Select two correct statements about the command shown below.
Note: $ is the command prompt. $ dropdb -U foo foodb
Answer : C, E
Select the correct SQL statement which concatenates strings 'ABC' and 'abc' to form 'ABCabc'.
Answer : E