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 表名;

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