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 1 row, and exits successfully.
E. 'SELECT' statement returns 0 rows, and exits successfully.
正解:D
質問 2:
You want to delete rows in the "product" table which include the value '2004' in the "name" field. Select the correct statement to achieve this task.
A. DELETE FROM product WHERE name SIMILAR TO '2004';
B. DELETE product WHEREcontain(name, '2004');
C. DELETE product WHERE name ~ '2004';
D. DELETE FROM product WHERE name IN '2004';
E. DELETE FROM product WHERE name LIKE '%2004%';
正解:E
質問 3:
The following question concerns the use of multibyte characters in PostgreSQL.
Select two correct items about character encoding in PostgreSQL.
A. Character encoding can be set on a per database basis.
B. Only a single character encoding can be specified for each database cluster.
C. When the database cluster is initialized,the or --multibyte option must be specified.
D. "./configure --enable-multibyte" must be designated at time of build.
E. Different character encodings can be specified for server and clients.
正解:A,E
質問 4:
The tables "s1" and "s2" are defined below.
The column "id" for tables "s1" and "s2" is of INTEGER type. The column "enable" for table "s1" is
of
BOOLEAN type, and the column "name" for table "s2" is of TEXT type.
s1:
id | enable
----+--------
1 | t
2 | f
s2:
id | name
----+-----
1 | post
2 | gre
3 | SQL
The following SQL was executed. Select the correct number of rows in the result. SELECT * FROM s2 WHERE id IN (SELECT id FROM s1);
A. 1 row
B. 4 rows
C. 5 rows
D. 2 rows
E. 3 rows
正解:D
質問 5:
Select two incorrect statements concerning the BOOLEAN type in PostgreSQL.
A. BOOLEAN is an alias of the INTEGER type inPostgreSQL.
B. You can use the TRUE or FALSE keywords as a value for the BOOLEAN type.
C. If the INTEGER value of '0' is inserted into a BOOLEAN column, it will be treated as FALS
D. BOOLEAN only takeseither NULL, TRUE, or FALSE.
E. You can use thecharacters 't' or 'f' as a value for the BOOLEAN type.
正解:A,C
質問 6:
I want to restore data from a text format backup file foo.dump. Select an appropriate command.
A. psql -f foo.dump foo
B. pg_restore -d foo foo.dump
C. createdb foo < foo.dump
D. pg_dump -R foo < foo.dump
E. pg_restore -f foo.dump foo
正解:A
喜屋** -
PGCES-02初心者の勉強意欲を阻害しかねません。安心します。このPGCES-02の本と過去問で1週間で合格できた。