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

版权声明:本文为博主原创文章,转载请注明出处。 https://blog.csdn.net/amoscn/article/details/80902093

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 ;

猜你喜欢

转载自blog.csdn.net/amoscn/article/details/80902093