paint-brush
What Is the Difference Between Enum, Varchar and Int Data Types in MySQLby@akankov
3,329 reads
3,329 reads

What Is the Difference Between Enum, Varchar and Int Data Types in MySQL

by Aleksei Kankov11mAugust 12th, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

The 'varchar' and 'enum' fields are different types of data types. They are different in terms of performance, easiness to use, and support for feature changes. An integer is not human-readable, and you have to keep the mapping between numbers and words in your code. The correct order of options in the fields should match your expected sorting behavior. The same story with enums takes the same byte consumption as with an intintintint, and it might bring some problems to beginners.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - What Is the Difference Between Enum, Varchar and Int Data Types in MySQL
Aleksei Kankov HackerNoon profile picture
Aleksei Kankov

Aleksei Kankov

@akankov

Convert coffee into code )

About @akankov
LEARN MORE ABOUT @AKANKOV'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Aleksei Kankov HackerNoon profile picture
Aleksei Kankov@akankov
Convert coffee into code )

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite