B
B
Benderlidze2013-10-18 12:38:30
MySQL
Benderlidze, 2013-10-18 12:38:30

what type to choose for numeric values ​​from 21 characters long?

Google gives the user id with a digital value of 21 characters
in which field to store such data in order to select the user relatively quickly using it.
Thank you.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Anatoly, 2013-10-18
@taliban

In strings store, select char, fixed. The muscle is quite good at digesting fixed-length strings.

S
skyboy, 2013-10-18
@skyboy

bigint
BIGINT[(M)] [UNSIGNED] [ZEROFILL]
Large integer. The signed range is from -9223372036854775808 to 9223372036854775807. The unsigned range is from 0 to 18446744073709551615. For BIGINT columns, there are a few things to consider:

P
Pavel Osadchuk, 2013-10-18
@xakpc

maybe crc32(id)?

V
Volodymyr S., 2013-10-18
@VYBGSS

In C# you can "System.Numerics.BigInteger".

N
noonesshadow, 2013-10-18
@noonesshadow

Split into two columns, eg. INT+BIGINT

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question