mysql 幾個命令

show databases;查看所有的數據庫

 

修改字符集:

 數據庫:alter database 數據庫名 character set utf8;

  表:alter table 表名 convert to character set gbk;

字段:alter table 表名 modify column 字段名 varchar(30) character set gbk not null;

 

查看字符集:

數據庫: show variables like '%char%';

表:show table status from 數據庫名 like '%表名%';

字段:show full columns from 表名;

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章