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);
Answer(s): B
A table is defined as below. Select the most suitable description about the foreign key constraint. CREATE TABLE master (id INTEGER PRIMARY KEY, name TEXT); CREATE TABLE record (id INTEGER REFERENCES master (id), count INTEGER);
Answer(s): C
You want to create a cursor that will SELECT the "customer" table. The created cursor must be able to move in any direction and reference data even after the end of the transaction. Select one answer containing the correct keyword(s) to fill in the underlined blank below. DECLARE cursor1 __________ FOR SELECT * FROM customer;
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;
Answer(s): E
The "sample" table consists of the data below. The column "x" is of type INTEGER. How many rows are returned by executing the following SQL statement? SELECT 6 / x FROM sample WHERE CASE WHEN x = 0 THEN FALSE ELSE TRUE END;
Answer(s): D
Post your Comments and Discuss Postgresql PGCES-02 exam prep with other Community members:
Our website is free, but we have to fight against AI bots and content theft. We're sorry for the inconvenience caused by these security measures. You can access the rest of the PGCES-02 content, but please register or login to continue.