当前位置:Gxlcms > 数据库问题 > 关于在Oracle 数据库存储m³(立方米)

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

时间:2021-07-01 10:21:17 帮助过:10人阅读

 

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

技术分享

 

如下是实验的过程:

  1. [oracle@lei1 ~]$ export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
  2. [oracle@lei1 ~]$ sqlplus scott/aaaaaa
  3. SQL*Plus: Release 11.2.0.3.0 Production on Sat Jun 20 10:02:14 2015
  4. Copyright (c) 1982, 2011, Oracle. All rights reserved.
  5. Connected to:
  6. Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
  7. With the Partitioning, OLAP, Data Mining and Real Application Testing options
  8. SQL> desc test_t1;
  9. Name Null? Type
  10. ----------------------------------------- -------- ----------------------------
  11. C1 VARCHAR2(20)
  12. SQL> truncate table test_t1;
  13. Table truncated.
  14. SQL> insert into test_t1 values('m³');
  15. 1 row created.
  16. SQL> commit;
  17. Commit complete.
  18. SQL> select * from test_t1;
  19. C1
  20. --------------------
  21. SQL> select property_value from database_properties where property_name='NLS_CHARACTERSET';
  22. PROPERTY_VALUE
  23. --------------------------------------------------------------------------------
  24. AL32UTF8
  25. SQL>


 


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

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

 

下面全文转载该文章:

  1. Problem Description:
  2. ====================
  3. You would like to store extended Math symbols and the Greek letter Alpha in
  4. the database because your business application requires the presence of those
  5. symbols. You do not know which character set is on the database, but on the
  6. application your NLS_LANG is set to NLS_LANG=American_America.we8iso8859p1 or
  7. AMERICAN_AMERICA.WE8MSWIN1252.
  8. Solution Summary:
  9. =================
  10. Your database was created with the wrong character set. Recreate the database
  11. with the correct character set.
  12. Choice of correct character sets:
  13. EL8ISO8859P7
  14. UTF8
  15. Al32UTF8
  16. Solution Description:
  17. =====================
  18. To find which character set is on the database level, connect internal or as
  19. DBA and run the following query:
  20. SVRMGR> select * from nls_database_parameters;
  21. You probably do not have EL8ISO8859P7, UTF8 or the AL32UTF8 character set
  22. listed for the NLS_CHARACTERSET parameter.
  23. Other character sets do not contain Greek letters or extended Math symbols.
  24. The character set that does is EL8ISO8859P7 or a UNICODE as character set, see:
  25. Note:260893.1 Unicode character sets in the Oracle database
  26. Solution Explanation:
  27. =====================
  28. All character data in an Oracle database is stored using a single character
  29. encoding scheme (character set). The database encoding scheme does not have
  30. to be the same as that used by an application to access database data.
  31. Although, the character set on the database level determines the choice of
  32. characters that can be stored. The database character encoding scheme is
  33. specified when the database is created, before it contains any data, by the
  34. CREATE DATABASE statement. The client-side encoding scheme is specified by
  35. defining the NLS_LANG parameter for a session. Once CREATE'd, a database
  36. encoding scheme cannot be changed without re-creating the database.


 

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

标签:

人气教程排行