Reputation: 3
I want to insert into a table values that contain both letters and numbers (like 'CL005' for example).
What data type should I use for my attribute ? 'number' doesn't work.
Thanks in advance !
Upvotes: 0
Views: 12094
Reputation: 1271151
You have no choice in most databases. You need to use a string. I would recommend varchar()
of some sort.
Some databases support a "variant" type that can hold different types. To be honest, this is very rarely used.
Upvotes: 1