Skip to main contentSkip to solution

To store the address of a person, which data type is more efficient?

Solution

✅ Correct Option: 2

An address is text whose length differs from person to person. varchar(50) is a variable-length type, so it stores only the characters actually entered (plus a small length overhead) and uses less space.


Option 1: char(50) is fixed-length, so a short address is padded with spaces up to 50 characters, which wastes storage.

Option 3: address is not a standard SQL data type.

Option 4: int holds only whole numbers, so it cannot store text such as street and city names.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question