Sample Questions of OSS-DB Exam Silver "Development/SQL"

[Development/SQL - SQL command (UPDATE statement)]

3.04

Regardless of the table definition, choose two statements that always result in an error.

  1. DELETE FROM t1. Table1 t 2 WHERE a = b;

  2. DELETE table1 WHERE column 1 = 100;

  3. DELETE FROM table1 t1, table2 t2 WHERE t1. A = t 2. B;
  4. DELETE FROM table1;
  5. DELETE FROM table1 WHERE a IN (SELECT x FROM table2);

[Development/SQL - SQL command (data type)]

3.03

Choose the correct statement about PostgreSQLs
data types.

  1. Since INTEGER can handle integers up to 10 digits, declaring it as NUMERIC (10) is the same.
  2. Since REAL can handle decimal numbers with precision of 6 digits, declaring it as NUMERIC (10, 6) is the same.
  3. DOUBLE PRECISION can handle decimal numbers with a precision of 15 digits, so declaring it as NUMERIC (10, 15) is the same.
  4. Since INTEGER's operation is faster than NUMERIC, if the value is always an integer, you should use INTEGER instead of NUMERIC.
  5. It is not possible to expect that the result will be true when performing equivalence comparison (comparison of the form of a = b) for 0.1 of the REAL type and 0.1 of the NUMERIC type.

[Development/SQL - SQL command (table definition)]

3.02

Choose the correct way to create a table with the id
column as the primary key.

  1. CREATE TABLE test (PRIMARY KEY id INTEGER, value TEXT);
  2. CREATE TABLE test (id INTEGER PRIMARY KEY, value TEXT);
  3. CREATE TABLE test (id INTEGER, value TEXT, PRIMARY KEY = id);

  4. CREATE TABLE test (id INTEGER, value TEXT, PRIMARY KEY id);

  5. CREATE TABLE test (id INTEGER, value TEXT, PRIMARY KEY (id));


[Development/SQL - Built-in functions
(aggregate functions)]

3.01

A table is created and data is inserted using the
following sequence of SQL statements.

CREATE TABLE sample1 (val INTEGER);
INSERT INTO sample1 (val) VALUES (1), (2), (3), (4), (NULL);

The following SELECT statement is executed.

SELECT count(*), count(val), avg(val) FROM sample1;

Which of the following is the correct combination of returned values?

  1. 5, 5, 2
  2. 5, 4, 2
  3. 5, 4, 2.5

  4. 4, 4, 2.5

  5. 5, 4, NULL


LPI-Japan
Platinum Sponsors