Select three SQL statements which return NULL.
A. SELECT 0 = NULL;
B. SELECT NULL != NULL;
C. SELECT NULL IS NULL;
D. SELECT NULL;
E. SELECT 'null'::TEXT;
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;
A. It is defining a rule "rule_1".
B. It will replace "rule_1" if it already exists.
C. Executing 'UPDATE user_view' will no longer output errors.
D. When executing 'UPDATE user_view', data is updated in the table that is the origin of the view.
E. 'DROP RULE rule_1 ON user_view' deletes the above definition.
Select one correct statement about the createlang command.
A. It is a command for setting the locale for a database.
B. It is a command for registering a procedural language into a database.
C. It is a command for creating a user defined function.
D. It is a command for adding message catalogs.
E. It is a command that has been discarded for version 8 and later.
Select two suitable statements regarding the pg_dump command.
A. pg_dump is an SQL command.
B. Only the user who executed initdb can execute pg_dump.
C. pg_dump can create a backup while postmaster is running.
D. pg_dump can create a backup while postmaster is stopped.
E. pg_dump can create a backup of a specified table.
Based on the following request, select the most appropriate command for creating a database cluster.
?Character encoding of the template database needs to be EUC_JP ?Locale is not used A. initdb --locale=EUC_JP --no-encoding
B. initdb --default-encoding=EUC_JP
C. pg_ctl init --locale=EUC_JP
D. initdb --encoding=EUC_JP --no-locale
E. pg_ctl init --encoding=EUC_JP
The following SQL defines an INSERT with respect to item_view. Select the keyword that is applicable in the underlined blank. CREATE foo AS ON INSERT TO item_view DO INSTEAD INSERT INTO item_table VALUES (NEW.id, NEW.itemname);
A. RULE
B. VIEW
C. TRIGGER
D. FUNCTION
E. CONSTRAINT
Select the correct result generated by execution of the following SQL statements: CREATE TABLE log (id
int, message TEXT, logtime TIMESTAMP); CREATE TABLE log_01 () INHERITS (log);
INSERT INTO log_01 VALUES (1, 'error', CURRENT_TIMESTAMP); SELECT * FROM log;
A. First 'CREATE TABLE' generates a syntax error.
B. Second 'CREATE TABLE' generates a syntax error.
C. 'INSERT' statement generates an error stating that the number of columns and values do not match".
D. 'SELECT' statement returns 0 rows, and exits successfully.
E. 'SELECT' statement returns 1 row, and exits successfully.
What does the following command do? Select the correct description from below. Note:
"text=#" is the command prompt for psql.
test=# ANALYZE foo;
A. Collects statistical information related to the content of the database foo.
B. Collects statistical information related to the content of the table foo.
C. Collects statistical information related to the content of the database test.
D. Outputs statistical information related to the content of the table foo.
E. The command does not generate an error; however, it does not do anything either.
Select two SQL statements which abort a transaction.
A. END
B. ROLLBACK
C. TRUNCATE
D. ABORT
E. DROP TRANSTACTION
A set of tables are defined as follows: t1 t2 How many rows are returned by executing the following SQL statement? SELECT t1.name FROM t1 CROSS JOIN t2;
A. 0 rows
B. 2 rows
C. 3 rows
D. 5 rows
E. 6 rows