Do underscores in a MySQL table names cause issues?

前端 未结 11 925
不知归路
不知归路 2021-02-06 22:17

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

For example, user_profiles

Would it be better to use user

11条回答
  •  无人及你
    2021-02-06 23:09

    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.

提交回复
热议问题