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?
A.
CHAR
B.
BYTE
C.
DOUBLE
D.
SMALLINT
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?
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?
A.
CHAR
B.
BYTE
C.
DOUBLE
D.
SMALLINT
letters AND digits .Answer is varchar
Char can be alpha-numeric.
VarChar is short for Variable Character, or that the character length can vary. Where if the length is or will be the exact same, then Char is ideal. Where the character length can vary, then Varchar is ideal.
Variable does not exclusively mean a number.
Either CHAR or VARCHAR can be correct. But remember you are not answering a question, you are taking a test. And the purpose of a test is to give the answer they want, not necessarily the right answer.
So, which is the answer they want? They are asking about, “one letter and four digits”. The “one letter” means that BYTE, DOUBLE, and SMALLINT are all wrong. So, CHAR is the answer they want.
It’s not a perfect answer, but remember, the purpose of a test is to pass the test!