关于在Oracle 数据库存储m³(立方米)

 

--------------注意:如下操作是在RHEL的VNC中执行的,并不是在secureCRT中执行的。------------
--------------原因:若是在secureCRT执行,m³会显示成:m鲁,见如下的截图,是啥原因我还没研究--

 

如下是实验的过程:

[oracle@lei1 ~]$ export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
[oracle@lei1 ~]$ sqlplus scott/aaaaaa

SQL*Plus: Release 11.2.0.3.0 Production on Sat Jun 20 10:02:14 2015

Copyright (c) 1982, 2011, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> desc test_t1;
 Name        Null?    Type
 ----------------------------------------- -------- ----------------------------
 C1          VARCHAR2(20)


SQL> truncate table test_t1;

Table truncated.

SQL> insert into test_t1 values('m³');

1 row created.

SQL> commit;

Commit complete.

SQL> select * from test_t1;

C1
--------------------
m³

SQL> select property_value from database_properties where property_name='NLS_CHARACTERSET';

PROPERTY_VALUE
--------------------------------------------------------------------------------
AL32UTF8

SQL> 


 


关于Oracle 数据库存储数学符号的描述,见如下的mos文章:

NEED TO STORE GREEK, MATH SYMBOLS (Doc ID 1060862.6)

 

下面全文转载该文章:


Problem Description:  
====================  
You would like to store extended Math symbols and the Greek letter Alpha in 
the database because your business application requires the presence of those 
symbols. You do not know which character set is on the database, but on the 
application your NLS_LANG is set to NLS_LANG=American_America.we8iso8859p1 or 
AMERICAN_AMERICA.WE8MSWIN1252.
  
Solution Summary:  
=================  
Your database was created with the wrong character set.  Recreate the database 
with the correct character set. 
 
Choice of correct character sets: 
   EL8ISO8859P7 
   UTF8 
   Al32UTF8
 
Solution Description:  
=====================  
To find which character set is on the database level, connect internal or as 
DBA and run the following query: 
 
    SVRMGR> select * from nls_database_parameters; 
 
You probably do not have EL8ISO8859P7, UTF8 or the AL32UTF8 character set 
listed for the NLS_CHARACTERSET parameter. 
 
Other character sets do not contain Greek letters or extended Math symbols.  
The character set that does is EL8ISO8859P7 or a UNICODE as character set, see:
Note:260893.1 Unicode character sets in the Oracle database
 
Solution Explanation:  
=====================  
All character data in an Oracle database is stored using a single character 
encoding scheme (character set). The database encoding scheme does not have 
to be the same as that used by an application to access database data.  
Although, the character set on the database level determines the choice of 
characters that can be stored. The database character encoding scheme is 
specified when the database is created, before it contains any data, by the 
CREATE DATABASE statement. The client-side encoding scheme is specified by 
defining the NLS_LANG parameter for a session. Once CREATE'd, a database 
encoding scheme cannot be changed without re-creating the database.


 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值