专业编程教程与实战项目分享平台

网站首页 > 技术文章 正文

查询数据库的编码方式 查看数据库的编码

ins518 2024-10-29 15:02:10 技术文章 7 ℃ 0 评论

在Mysql中

(1)查看Mysql数据库编码

 show variables like 'character_set_database'  或者 show create database 数据库名称

(2)查看Mysql中某张表的编码

show create table 表名

show create database 数据库名称、show create table 表名 ,还能够显示建库和建表语句。

(3)显示更多的编码

show variables like 'character%'

a)character_set_client为客户端编码方式;

b)character_set_connection为建立连接使用的编码;

c)character_set_database数据库的编码;

d)character_set_results结果集的编码;

e)character_set_server数据库服务器的编码;

在Oracle中

(1)查看oracle客户端编码

select * from nls_instance_parameters where parameter='NLS_LANGUAGE'

(2)查看oracle数据库编码

select * from nls_database_parameters where parameter ='NLS_CHARACTERSET'

(3)查看Oracle中某张表的编码

select distinct(userenv('language')) from 表名

#闪光时刻第二期主题征文##学问分享官#

Tags:

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表