Alex Oxilg Alex Oxilg - 11 months ago 67
MySQL Question

which datatype for resolution

Which datatype would fit the most for saving resolution into a database?

For example something like:


I would use a varchar but I am not really sure if that is correct (best practice)

Answer Source

Use 2 integer columns - height and width. Always store atomic data and never mutliple values in a single column.

unsigned smallint should be enough for your purposes.