V
V
Vitaly2014-12-17 15:06:53
Database design
Vitaly, 2014-12-17 15:06:53

What does the value 400 in varchar(400) indicate?

If a column in a table has a varchar(400) data type, does this mean that this column can fit 400 characters, in the specified encoding, or does it mean that 400 bytes can fit?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
beta3-z, 2014-12-17
@silverhawk90

Capacity 400 characters. Before version 4.1 in bytes.
Found on stackoverflow .
Documentation .

M
memba, 2014-12-17
@memba

Here ( webonrails ) you can read about one of the pitfalls of misunderstanding characters and bytes in varchar fields.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question