Are column and table name case sensitive in MySQL?

后端 未结 5 1063
遥遥无期
遥遥无期 2020-11-28 09:04

If I have a column names called category_id and Category_Id, are they different?

And if I have table called category and

5条回答
  •  鱼传尺愫
    2020-11-28 09:51

    On Unix, table names are case sensitive. On Windows, they are not. Fun, isn't it? Kinda like their respective file systems. Do you think it's a coincidence?

    In other words, if you are planning on deploying on a Linux machine, better test your SQL against a Linux-based MySQL too, or be prepared for mysterious "table not found" errors at prod time. VMs are cheap these days.

    Field (column) names are case-insensitive regardless.

    EDIT: we're talking about the operating system on the MySQL server machine, not client.

提交回复
热议问题