A
A
Aino4ka2016-01-04 18:48:29
MySQL
Aino4ka, 2016-01-04 18:48:29

Where to store a 12-digit hash?

I want to use a random 12-digit numerically literal value as a primary key for mysql.
the question is what is better to store char, varchar, binary?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Peter, 2016-01-04
@petermzg

Of course char(12), because you have a constant size.
That's just the primary key and random value is the source of big problems.
Highly complicate the system by checking for collisions on the primary key.

R
romy4, 2016-01-04
@romy4

doesn't matter absolutely. which is more convenient for the final result, in that and store

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question