Teradata For Beginner 2 — Questions and Answers
Question 1: Which Teradata SQL command is used to remove all rows from a table without deleting the table structure?
- DROP TABLE
- DELETE FROM
- TRUNCATE TABLE (Correct answer)
- REMOVE TABLE
Correct answer: TRUNCATE TABLE
TRUNCATE TABLE removes all rows quickly without logging individual row deletions, preserving the table structure.
Question 2: In Teradata, what is the purpose of the PRIMARY INDEX (PI)?
- To enforce uniqueness of rows
- To determine how rows are distributed across AMPs (Correct answer)
- To speed up JOIN operations only
- To define the sort order of data
Correct answer: To determine how rows are distributed across AMPs
The Primary Index determines which AMP receives and stores a given row based on a hash of the PI column values.
Question 3: What does AMP stand for in Teradata architecture?
- Automated Memory Processor
- Access Module Processor (Correct answer)
- Advanced Multi-Processing
- Aggregate Management Processor
Correct answer: Access Module Processor
AMP stands for Access Module Processor, which is the virtual processor responsible for managing data storage and retrieval.
Question 4: Which data type in Teradata is best suited for storing monetary values with exact decimal precision?
- FLOAT
- DECIMAL (Correct answer)
- BYTEINT
- REAL
Correct answer: DECIMAL
DECIMAL (or NUMERIC) stores exact fixed-point values, making it ideal for monetary amounts where precision matters.
Question 5: What is a Multiset table in Teradata?
- A table that spans multiple databases
- A table that allows duplicate rows (Correct answer)
- A table with multiple primary indexes
- A table replicated across all AMPs
Correct answer: A table that allows duplicate rows
A Multiset table permits duplicate rows, unlike a Set table which enforces row-level uniqueness.
Question 6: In Teradata SQL, which function returns the current date?
- NOW()
- GETDATE()
- CURRENT_DATE (Correct answer)
- TODAY()
Correct answer: CURRENT_DATE
CURRENT_DATE is the ANSI-standard Teradata function that returns the current session date.
Question 7: What happens when a Teradata query uses a Full Table Scan (FTS)?
- Only the first AMP reads the data
- All AMPs read all rows in the table (Correct answer)
- The BYNET routes data to a single PE
- Only rows matching the PI are read
Correct answer: All AMPs read all rows in the table
A Full Table Scan causes all AMPs to read every row in their portion of the table, which can be resource-intensive on large tables.
Which Teradata SQL command is used to remove all rows from a table without deleting the table structure?