微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Oracle NChar类型的注意事项

You can bind or define a Java string against anNCHARcolumn without explicitly specifying the form of use argument. This implies the following:

  • If you do not specify the argument in thesetString()method,then JDBC assumes that the bind or define variable is for the sqlCHARcolumn. As a result,it tries to convert them to the database character set. When the data gets to the database,the database implicitly converts the data in the database character set to the national character set. During this conversion,data can be lost when the database character set is a subset of the national character set. Because the national character set is either UTF8 or AL16UTF16,data loss would happen if the database character set is not UTF8 or AL32UTF8.

  • Because implicit conversion from sqlCHARto sqlNCHARdata types happens in the database,database performance is degraded.

原文地址:https://www.jb51.cc/oracle/210788.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐