Do underscores in a MySQL table names cause issues?

前端 未结 11 916
不知归路
不知归路 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:12

    The only issue I've seen is that when using mysqlshow to view the structure of a table it appears to treat the underscore as a wildcard and returns only matching table names if there is an underscore in the name.

    I could find no way to view the table structure of a table if there is an underscore in the name. I just discovered and confirmed this myself this morning.

    I know this to be true of MySQL versions 4.0.18 and 4.1.22 for older versions and 5.1.52 for newer. Perhaps this is documented somewhere (I haven't taken the time to look yet), but it might be a perplexing thing for others, so I decided to mention it when I ran across this question when looking for information on the problem myself.

提交回复
热议问题