🎴 Flashcard Mode

DB2 Database Fundamentals and SQL

Card1 / 20
Mastered0
Review0
QuestionClick to flip

Given the following scenario: Table TABLE1 needs to hold specific numeric values up to 9999999.999 in column COL1. Once TABLE1 is populated, arithmetic operations will be performed on data stored in col-umn COL1. Which of the following would be the most appropriate DB2 data type to use for column COL1?

AnswerClick to flip back
A
DECIMAL(10,3)
💡 Explanation:

DECIMAL(10,3) provides 7 digits before the decimal and 3 after (9999999.999), which matches the requirement. INTEGER has no decimals, REAL uses floating-point with potential precision loss, and NUMERIC(7,3) only allows 4 digits before the decimal (9999.999). The DECIMAL type ensures precise arithmetic operations.

Change Mode