SQL Functions and Joins

Covers SQL single-row functions (ROUND, TRUNC, MOD, LAST_DAY), joins (equi-join, self-join, outer join), subqueries, and Teradata Mload operations

20 Questions Published

Questions

Question 1 True/False

IGNORE DUPLICATE ROWS does not apply if there are any unique indexes in the table.

  1. True
  2. False
Question 2 True/False

The DELETE with a WHERE clause starts a period(.) in MLOAD

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

Which of the below table is essentail when restarting a Mload Script

  1. Error Table
  2. UV Table
  3. Work Table
  4. Log Tbale
Question 4 Multiple Choice (Single Answer)

Select the DDL statements suppoerted by Mload

  1. Drop
  2. Create
  3. Alter
  4. Rename
Question 5 True/False

In a join condition it is mandatory to specify the table name along with the Column name.

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

An outer join is used to:

  1. Return records which have no direct match
  2. Return records which have direct match
  3. Return all the records
  4. None of the above
Question 7 Multiple Choice (Single Answer)

____________ is the outer join operator.

  1. (+)
  2. (-)
  3. (*)
  4. +
Question 8 Multiple Choice (Single Answer)

____________ is used to join a table to itself.

  1. Selfjoin
  2. Outerjoin
  3. innerjoin
  4. equijoin
Question 9 True/False

The value returned by the subquery is used by the main query.

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

The minimum number of join statements required to join 10 tables together are:

  1. 9
  2. 11
  3. 5
  4. 12
  5. None of the above
Question 11 True/False

Sorting SQL statement result data by column alias is not possible.

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

What are the two types of SQL Functions?

  1. Single-row Functions and Double-row Functions
  2. One-row Functions and Two-row Functions
  3. Single-row Functions and Multiple-row Functions
  4. None of the above
Question 13 True/False

Single-Row Functions can return multiple results per row.

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

What is the output of the following? SELECT ROUND(1111.93412,3) FROM DUAL;

  1. 1112
  2. 1111.93
  3. 1111.93412
  4. 1111.934
Question 15 Multiple Choice (Single Answer)

Compare the output of the following: SELECT TRUNC(99.57,1) FROM DUAL; and SELECT ROUND(99.57,1) FROM DUAL;

  1. 99.57,99,6
  2. 99.5,99.6
  3. 99.6,99.6
  4. 99.57,99.57
Question 16 Multiple Choice (Single Answer)

What does the MOD Function do?

  1. It divides both the values and gives the quotient.
  2. It multiplies both the values and gives the product.
  3. It divides both the values and gives the remainder.
  4. There is no such function.
Question 17 True/False

A null is the same as zero or a blank space.

  1. True
  2. False
Question 18 True/False

To perform wild card search “Like” is used .

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

Which of the following WHERE clauses represent equi-join?

  1. Table1.column1=Table2.column2
  2. Table1.column1=Table2.column1
  3. Table1.column2=Table2.column1
  4. None of the above
Question 20 True/False

LAST_DAY(date) finds the date of the last day of the month that contains date.

  1. True
  2. False