Database Fundamentals — Question 130
You are creating a table to store customer data. The AccountNumber column uses values that always consist of one letter and four digits. Which data type should you use for the AccountNumber column?
Answer options
- A. CHAR
- B. BYTE
- C. DOUBLE
- D. SMALLINT
Correct answer: A
Explanation
The CHAR data type is appropriate for the AccountNumber column because it can store fixed-length strings, which is ideal for values that have a consistent format of one letter followed by four digits. The BYTE data type is not suitable as it is used for binary data, DOUBLE is meant for floating-point numbers, and SMALLINT is used for integer values, none of which fit the specified format.