MySql Table Options: ENGINE, CHARACTER SET, COLLATION

Опубликовано: 11 Май 2026
на канале: The Flask
975
22

🙏 Please consider SUBSCRIBING !!! 🧧 Patreon Donations:   / theflask  

Click "SHOW MORE" below to see the cool guides !!! 😎

MySql Table Options: ENGINE, CHARACTER SET, COLLATION

References:
https://gist.github.com/joemalski/b75...
https://mcdlr.com/utf-8/#1
https://database.guide/what-is-collat...
https://dbaclass.com/article/how-to-g...
https://dev.mysql.com/doc/refman/5.7/...


-- basic table definition
CREATE TABLE user (
id INT AUTO_INCREMENT PRIMARY KEY,
firstname VARCHAR(25),
lastname VARCHAR(25)
) ENGINE=InnoDB CHARSET=utf8 COLLATE=utf8_general_ci;


ENGINE - A database engine (or storage engine) is the underlying software
component that a database management system (DBMS) uses to
create, read, update and delete (CRUD) data from a database.

CHARACTER SET / CHARSET - A character set determines what languages
can be represented in the database.
example: CHARSET = utf8

COLLATE - "Collation" specifies how data is sorted and compared in a
database. Collation provides the sorting rules, case, and accent
sensitivity properties for the data in the database.

For example, when you run a query using the ORDER BY clause,
collation determines whether or not uppercase letters and
lowercase letters are treated the same.

example: COLLATE = utf8_general_ci

ci - "case-insensitive"
cs - "case-sensitive"
ai - "accent-insensitive"
as - "accent-sensitive"


Check Available CHARACTER SET in MySQL:
SHOW CHARACTER SET;
SHOW CHARACTER SET LIKE 'latin%';

Check Available COLLATE "COLLATION" in MySQL:
SHOW COLLATION;
SHOW COLLATION WHERE Charset = 'latin1';

🙏 Please consider SUBSCRIBING !!! 🧧 Patreon Donations:   / theflask  

DISCLAIMER:
All product and company names are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.

Use of MySQL Conditional Use Logos:
https://bit.ly/3iwhu4I