SQL and Database Fundamentals Quiz
A quiz covering SQL statements, DDL commands, operators, joins, and database concepts including some Teradata-specific functionality.
Questions
In databases, ON UPDATE CASCADE ensures which of the following?
- Normalization
- Data Integrity
- Materialized Views
- None of these
A NOT IN query will return rows if a NULL value is in the subquery or IN list
- True
- False
The possibilities for the two tables to be joined resides in the same AMP are
- The two tables had their same Primary Index
- Teradata redistributed one or both tables by rehashing them by thePrimary index in spool
- Teradata placed the smaller table on all AMPs
- All the Above
The command used to display the DDL of certain objects
- EXPLAIN
- HAVING
- SHOW
- HELP
Order of precedence for sql in teradata is
- NOT, Parenthesis AND, OR
- Parenthesis,NOT, AND, OR
- Parenthesis, OR ,NOT, AND
- Parenthesis,NOT, OR, AND
Anytime you mix aggregates with non-aggregates you must use the group by statement
- True
- False
Which join requires denormalisation of the table
- Self Join
- Cartesian Join
- Cross Join
- Hash Join
What is decode equivalent function in Teradata
- CAST
- COALESCE
- PARTITION BY
- RANDOM
The SET operators used in teradata sql are
- INTERSECT
- UNION
- EXCEPT
- MINUS
- All the above
- None of the above
SET clause in CREATE statement allows duplicate rows whereas MULTISET will not
- True
- False
These joins always requires SPOOL Files
- Product Join
- Exclusion Merge Join
- Merge Join
- All the Above
What does SQL stand for?
- Structured Question Language
- Structured Query Language
- Strong Question Language
- None
Select the DDL Statement from below:
- SELECT
- UPDATE
- DELETE
- ALTER
SQL is case sensitive
- True
- False
The SQL statement used to delete a table:
- DROP
- DELETE
- TRUNCATE
- All the Above
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.
- 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%'
- True
- False
The Correct Statement to select a column named "LastName" from a table named "Employee".
- SELECT LastName FROM Employee
- EXTRACT LastName FROM Employee
- SELECT Employee.LastName
- None
The Correct Statement to select all the columns from a table named "Employee".
- SELECT *.Employee
- SELECT [all] FROM Employee
- SELECT * FROM Employee
- SELECT Employee