CyberJunkie CyberJunkie - 1 month ago 11
MySQL Question

Do underscores in a MySQL table names cause issues?

Do underscores in table names affect performance or cause issues on some platforms?

For example,

user_profiles


Would it be better to use
userProfiles
or is it just a matter of personal preference?

Ben Ben
Answer

Nope. Underscores are perfectly legal in table names.

This page here in the MySQL documentation tells you about what characters are allowed.

Basically:

Permitted characters in unquoted identifiers:

ASCII: [0-9,a-z,A-Z$_]
Extended: U+0080 .. U+FFFF

Permitted characters in quoted identifiers:

ASCII: U+0001 .. U+007F
Extended: U+0080 .. U+FFFF

Personally I tend to stick with lowercase a-z, the occasional number, and underscores. But as @Vince said, it's just personal preference.