A sequence has the following definition: CREATE SEQUENCE seq1 CACHE 10 CYCLE; Select the value that is returned by executing the following SQL. SELECT nextval('seq1');
Answer(s): B
A table and view are defined as follows: CREATE TABLE item (id INT, name TEXT, description TEXT); CREATE VIEW item_simple AS SELECT id, name FROM item; A set of SQL statements were executed in the order below. Select the most appropriate statement concerning the execution results. BEGIN; SELECT * FROM item_simple; INSERT INTO item_simple VALUES (1, 'item_name_1'); UPDATE item_simple SET name = 'item_name_2' WHERE id = 1; DELETE FROM item_simple; END;
The present time is noon of July 7th, 2007, and the result of the following SQL sentence was '2007-07-17 12:00:00'. Select the correct expression to fill in the blank below. SELECT CURRENT_TIMESTAMP::timestamp + ________________ ;
You want to set a constraint so that the "item_id" in the "sales" table will always have a value that already exists as "id" in the "item_master" table. Select the correct SQL statement to fill in the underlined blank of the "sales" table. Definitions: CREATE TABLE item_master ( id INTEGER PRIMARY KEY, name TEXT ); CREATE TABLE sales ( sales_id INTEGER, item_id INTEGER, num INTEGER, );
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.
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.