본문 바로가기
개발노트

[개발노트] char/varchar

by 별토끼. 2017. 9. 10.
반응형


[개발노트] char/varchar


CHAR

  1. Used to store character string value of fixed length.

  2. The maximum no. of characters the data type can hold is 255 characters.

  3. It's 50% faster than VARCHAR.

  4. Uses static memory allocation.

VARCHAR

  1. Used to store variable length alphanumeric data.

  2. The maximum this data type can hold is up to

  3. Pre-MySQL 5.0.3: 255 characters.
  4. In MySQL 5.0.3+: 65,535 characters shared for the row.

  5. It's slower than CHAR.

  6. Uses dynamic memory allocation*.


[참조] https://stackoverflow.com/questions/1885630/whats-the-difference-between-varchar-and-char

반응형

댓글