Amos的随笔

Java/Python/Go,软件测试等等

导航

不同数据库(mysql、postgresql)查询字符编码方式

mysql

#  所有带name的字段均使用对应表名或者database名替代
#  根据库名查所有的表
show full tables from databaseName;
# 查询建表语句
show create table databaseName.tableName;
# 查询建库语句
show create database databaseName;
# 查询字符集
show character set;
# 查询不同级别字符集设置
show variables like 'char%'

postgresql

--  查询客户端字符编码
show client_encoding;
--  查询服务端字符编码
show server_encoding ;

posted on 2018-07-03 17:50  AmosChen  阅读(1)  评论(0编辑  收藏  举报  来源