Why am i seeing 'incorrect string value' in sql?

Example:

INSERT INTO users (name) VALUES ('José');

Trying to insert a string with characters not supported by the column's character set.

Solution:

Ensure the column's character set supports the characters you're trying to insert or change the character set of the column.


-- First, modify the character set if needed:
ALTER TABLE users MODIFY name VARCHAR(255) CHARACTER SET utf8mb4;
-- Then, perform the insertion:
INSERT INTO users (name) VALUES ('José');

Beginner's Guide to SQL