psql generated the following error message: psql: could not connect to server: Connection was refused Is the server running on host "server.example.com" and accepting TCP/IP connections on port 5432? Select two reasons that are NOT the cause of this error.
Given the following two table definitions, select one SQL statement which will cause an error. CREATE TABLE sample1 (id INTEGER, data TEXT); CREATE TABLE sample2 (id INTEGER);
The table "score" is defined as follows:
gid | score
-----+-------
1 | 70 1 |
60 2 | 100
3 | 80 3 |
50
The following query was executed. Select the correct result value. SELECT score FROM score ORDER BY gid DESC, score ASC LIMIT 1;
The "sample" table consists of the following data:
How many rows are returned by executing the following SQL statement?
SELECT i FROM sample GROUP BY i HAVING count(*) = 2;
The table "t1" is defined below. The column "id"
for table "t1" is of INTEGER type.
id | name ----
+-----------1 |
mammoth 2 |
tortoise 3 |
coelacanth
The following SQL statements were executed. Select the correct statement about the execution result. BEGIN; DECLARE c SCROLL CURSOR FOR SELECT name FROM t1 ORDER BY id;
MOVE FORWARD 2 FROM c; FETCH FORWARD ALL FROM c; COMMIT;