SQL Functions and Joins

Test your knowledge of SQL functions (ROUND, TRUNC, MOD, SYSDATE, LAST_DAY), join types (self join, outer join, equi-join), and other essential SQL concepts.

20 Questions Published

Questions

Question 1 True/False

We can nest Group Functions

  1. True
  2. False
Question 2 True/False

SYSDATE is a date function that returns the current database server date and time.

  1. True
  2. False
Question 3 True/False

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

  1. True
  2. False
Question 4 True/False

To perform wild card search “Like” is used .

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

When is a Cartesian product formed?

  1. When a join condition is omitted.
  2. When a join condition is invalid.
  3. All rows in the first table are joined to all rows in the second table.
  4. All of the above.
Question 6 True/False

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

  1. True
  2. False
Question 7 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 8 True/False

A Non equi-join is a join condition that does not contain an equality operator.

  1. True
  2. False
Question 9 True/False

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

  1. True
  2. False
Question 10 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 11 True/False

Single-Row Functions can return multiple results per row.

  1. True
  2. False
Question 12 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 13 True/False

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

  1. True
  2. False
Question 14 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 15 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 16 Multiple Choice (Single Answer)

____________ is the outer join operator.

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

____________ is used to join a table to itself.

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

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

  1. True
  2. False
Question 19 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 20 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.