mysql语句表名大小写敏感_Mysql 表名大小写敏感
默認情況下,mysql在創建數據庫對象時,是區分大小寫的。故與microsoft之間進行移植時,要特別注意是否存在問題。在mysql中大小寫與參數lower_case_table_names有很大關系。
以下為官方解釋:
If set to 0, table names are stored as specified and comparisons are case sensitive. If set to 1, table names are stored in lowercase on disk and comparisons are not case sensitive. If set to 2, table names are stored as given but compared in lowercase. This option also applies to database names and table aliases.
當設置為0時,存儲和比較都是大小寫敏感的;當設置為1是存儲時會轉換為小寫,比較時不區分大小寫;當設置為2時候,存儲時區分大小寫,比較的時與轉換為小寫。此選項對數據庫名和數據表名起作用。
lower_case_table_names是個只讀變量,不能直接設置生效,必須在配置文件中設置并重啟mysqld服務。
mysql> set lower_case_table_names=1;
總結
以上是生活随笔為你收集整理的mysql语句表名大小写敏感_Mysql 表名大小写敏感的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: mysql timestamp 并发_M
- 下一篇: mysql查询不重复记录数_mysql查