Choose the most suitable statement about user management of PostgreSQL.
Note: the version of PostgreSQL is 8.0.
Answer : D
Select two appropriate statements from below about the following SQL statements:
CREATE FUNCTION myfunc(INTEGER) RETURNS text LANGUAGE plpgsql STRICT AS '
DECLARE x ALIAS FOR $1; r text := ''default''; BEGIN IF x > 100 THEN SELECT INTO r data FROM mytable WHERE id = x; END IF; RETURN r; END;';
Answer : A, E
Select the SQL command that must be executed prior to executing the EXECUTE command.
Answer : B
I would like to copy a database cluster directory for backup.
Select two incorrect statements from below.
Answer : D, E
The tables "t1" and "t2" are defined in the same way (they have the same data types and column names). You want to select rows in "t1" which are not in "t2". Select a correct keyword to fill in the blank below. SELECT * FROM t1 ______ SELECT * FROM t2;
Answer : 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 : B, D
Select two suitable statements regarding the pg_dump command.
Answer : C, E