SQL and Database Fundamentals Quiz

A quiz covering SQL statements, DDL commands, operators, joins, and database concepts including some Teradata-specific functionality.

19 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

In databases, ON UPDATE CASCADE ensures which of the following?

  1. Normalization
  2. Data Integrity
  3. Materialized Views
  4. None of these
Question 2 True/False

A NOT IN query will return rows if a NULL value is in the subquery or IN list

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

The possibilities for the two tables to be joined resides in the same AMP are

  1. The two tables had their same Primary Index
  2. Teradata redistributed one or both tables by rehashing them by thePrimary index in spool
  3. Teradata placed the smaller table on all AMPs
  4. All the Above
Question 4 Multiple Choice (Single Answer)

The command used to display the DDL of certain objects

  1. EXPLAIN
  2. HAVING
  3. SHOW
  4. HELP
Question 5 Multiple Choice (Single Answer)

Order of precedence for sql in teradata is

  1. NOT, Parenthesis AND, OR
  2. Parenthesis,NOT, AND, OR
  3. Parenthesis, OR ,NOT, AND
  4. Parenthesis,NOT, OR, AND
Question 6 True/False

Anytime you mix aggregates with non-aggregates you must use the group by statement

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

Which join requires denormalisation of the table

  1. Self Join
  2. Cartesian Join
  3. Cross Join
  4. Hash Join
Question 8 Multiple Choice (Single Answer)

What is decode equivalent function in Teradata

  1. CAST
  2. COALESCE
  3. PARTITION BY
  4. RANDOM
Question 9 Multiple Choice (Single Answer)

The SET operators used in teradata sql are

  1. INTERSECT
  2. UNION
  3. EXCEPT
  4. MINUS
  5. All the above
  6. None of the above
Question 10 True/False

SET clause in CREATE statement allows duplicate rows whereas MULTISET will not

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

These joins always requires SPOOL Files

  1. Product Join
  2. Exclusion Merge Join
  3. Merge Join
  4. All the Above
Question 12 Multiple Choice (Single Answer)

What does SQL stand for?

  1. Structured Question Language
  2. Structured Query Language
  3. Strong Question Language
  4. None
Question 13 Multiple Choice (Single Answer)

Select the DDL Statement from below:

  1. SELECT
  2. UPDATE
  3. DELETE
  4. ALTER
Question 14 True/False

SQL is case sensitive

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

The SQL statement used to delete a table:

  1. DROP
  2. DELETE
  3. TRUNCATE
  4. All the Above
Question 16 True/False

The AND operator displays a record if both the first condition and the second condition is true. The OR operator displays a record if either the first condition or the second condition is true.

  1. True
  2. False
Question 17 True/False

The below Query is to select the persons with a first name that starts with any character, followed by "la" from the "Persons" table. SELECT * FROM Persons WHERE FirstName LIKE '%la%'

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

The Correct Statement to select a column named "LastName" from a table named "Employee".

  1. SELECT LastName FROM Employee
  2. EXTRACT LastName FROM Employee
  3. SELECT Employee.LastName
  4. None
Question 19 Multiple Choice (Single Answer)

The Correct Statement to select all the columns from a table named "Employee".

  1. SELECT *.Employee
  2. SELECT [all] FROM Employee
  3. SELECT * FROM Employee
  4. SELECT Employee