建庫和建表中編碼問題

2022-07-18 05:36:09 字數 388 閱讀 6808

utf8_genera_ci不區分大小寫,ci為case insensitive的縮寫,即大小寫不敏感。

utf8_bin將字串中的每乙個字元用二進位制資料儲存,區分大小寫。

例如:select * from table where txt = 'a'

那麼在utf8_bin中你就找不到 txt = 'a' 的那一行, 而 utf8_general_ci 則可以

utf8_unicode_ci比較準確,utf8_general_ci速度比較快。通常情況下 utf8_general_ci的準確性就夠用了,所以新建資料 庫時一般選用utf8_general_ci就可以了。

一般資料庫設定好編碼之後,建表時一般不設定則繼承

MS SQL Server 建庫建表

create database test use test 建立使用者型別表 create table usertype id int not null identity 1,1 primary key,typename varchar 200 default null typedescriptio...

mysql建立使用者表 mysql 建庫建表建使用者

1.建立資料庫 create database school 2.使用資料庫 use school 3.建立使用者 create user jame localhost identified by jame 4.授權使用者 注意這裡是用了 哦,可以自己講school也替換成 號 grant sele...

mysql登入,建庫,建表

cmd下 mysql u使用者名稱 p密碼 使用者名稱可以用root 密碼沒有可以不設 顯示資料庫 show databases 檢視當前使用的資料庫 select database 建立資料庫 create database 資料庫名 character set utf8 字符集 collate ...