SQL, Data Modeling, and PL/SQL Quiz

Comprehensive quiz covering SQL functions, operators, joins, data warehousing concepts, data modeling techniques, and PL/SQL exception handling.

19 Questions Published

Questions

Question 1 True/False

PL/SQL raises the predefined exception NO_DATA_FOUND if a SELECT INTO statement returns no rows

  1. True
  2. False
Question 2 True/False

We cannot declare the same exception in two different blocks

  1. True
  2. False
Question 3 Multiple Choice (Multiple Answers)

which statement(s) does the following If @variable is NULL return '5', else return @variable

  1. ISNULL(@variable,'5')
  2. NULLIF(@variable,'5')
  3. COALESCE(@variable,'5')
  4. NONNULL(@variable,'5')
Question 4 Multiple Choice (Single Answer)

I want my row numbers to come up as 1,2,2,2,3 while using a ranking function. Which ranking function should I use?

  1. ROW_NUMBER()
  2. RANK()
  3. DENSE_RANK()
  4. NTILE(integer_expression)
Question 5 Multiple Choice (Single Answer)

Below is not in the steps to build the Dataware House :

  1. Requirement gathering
  2. Data modeling
  3. Data profiling
  4. Data mining
Question 6 Multiple Choice (Single Answer)

Process in which data from disparate, homogeneous or heterogeneous systems is cleansed, aggregated, consolidated, de-normalized and loaded into a single database or data warehouse after applying business rules is :

  1. Data Profiling
  2. Data Modelling
  3. Data Integration
  4. Data Staging
Question 7 True/False

Can you convert a snowflake schema in to star schema?

  1. True
  2. False
Question 8 True/False

Is Data modelling and Dimensional modelling same?

  1. True
  2. False
Question 9 Multiple Choice (Single Answer)

Which one is not the technique in ER modelling?

  1. Conceptual modelling
  2. Physical modelling
  3. Logical modelling
  4. None of the above
Question 10 Multiple Choice (Single Answer)

Another name for the EXCEPT operator is __________.

  1. INSTEAD OF
  2. NOT IN
  3. INTERSECT
  4. MINUS
Question 11 Multiple Choice (Single Answer)

Select the correct order of clauses

  1. GROUP BY, HAVING, WHERE
  2. HAVING, WHERE, GROUP BY
  3. GROUP BY, WHERE, HAVING
  4. WHERE, GROUP BY, HAVING
Question 12 Multiple Choice (Single Answer)

CREATE SET TABLE A (A Integer, B Integer) Unique Primary Index (A) INSERT INTO Table A (1, 2) INSERT INTO Table A (1, 1) UPDATE Table A SET b = b + 1 WHERE b = 1. Which statement is correct?

  1. Both the INSERTs and the UPDATE fails.
  2. The INSERTs work, but the UPDATE fails
  3. Only the first INSERT works.
  4. Only the second INSERT works
Question 13 Multiple Choice (Single Answer)

What is the displayed result of the following: SELECT 3 / 4 * 100?

  1. 0
  2. .75
  3. 75
  4. 75.00
Question 14 Multiple Choice (Single Answer)

In a Join, when is the ON clause required?

  1. If the Join is a SELF JOIN.
  2. Only if the WHERE clause is not used.
  3. If the keyword INNER is specified.
  4. all the time.
Question 15 Multiple Choice (Single Answer)

What is the result of the following SQL statement? SELECT INDEX (SUBSTRING ('RALPH JOHNSON' FROM 6 FOR 5), 'OHN');

  1. 3
  2. 5
  3. 6
  4. 2
Question 16 Multiple Choice (Single Answer)

Which type of table provides the DDL, but does not share the data

  1. Global Temporary
  2. Permanent
  3. Derived
  4. Volatile
Question 17 Multiple Choice (Single Answer)

Which commands do the same thing?

  1. HAVING and GROUP BY
  2. HAVING and QUALIFY
  3. QUALIFY and QUANTIFY
  4. QUALIFY and ORDER BY
Question 18 Multiple Choice (Single Answer)

Which operator works like an OUTER JOIN?

  1. Minus
  2. Except
  3. Intersect
  4. Union
Question 19 Multiple Choice (Single Answer)

Which function return NULL when X = Y and X when it does not?

  1. NULLIF(X,Y)
  2. COALESCE(X,Y)
  3. ZEROIFNULL(X,Y)
  4. NULLIFZERO(X,Y)