免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3809 | 回复: 3
打印 上一主题 下一主题

db2 中Literal Replacement怎么理解,一直不明白,能否举例说明。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-06-16 17:15 |只看该作者 |倒序浏览
10可用积分
关于Literal Replacement功能不知道怎么实现,我的理解是:常量替换,允许只有常量不同,但其他都相同的SQL语句共享一个公共section. 从而降低编译成本。但不知道怎么才能实现,看到效果,请高手不吝指教!有相关的资料也可以!多谢!

论坛徽章:
0
2 [报告]
发表于 2009-06-16 18:16 |只看该作者
NCHAR String Literal Replacement

This section provides information on how to avoid data loss when performing NCHAR string literal replacement.
http://download.oracle.com/docs/ ... ch7progrunicode.htm

论坛徽章:
0
3 [报告]
发表于 2009-06-16 18:19 |只看该作者

回复 #1 fuxc_666 的帖子

NCHAR String Literal Replacement

This section provides information on how to avoid data loss when performing NCHAR string literal replacement.

Being part of a SQL or PL/SQL statement, the text of any literal, with or without the prefix N, is encoded in the same character set as the rest of the statement. On the client side, the statement is in the client character set, which is determined by the client character set defined in NLS_LANG, or specified in the OCIEnvNlsCreate() call, or predefined as UTF-16 in JDBC. On the server side the statement is in the database character set.

    *

      When the SQL or PL/SQL statement is transferred from client to the database server, its character set is converted accordingly. It is important to note that if the database character set does not contain all characters used in the text literals, then the data is lost in this conversion. This problem affects NCHAR string literals more than the CHAR text literals. This is because the N' literals are designed to be independent of the database charactser set, and should be able to provide any data that the client character set supports.

      To avoid data loss in conversion to an incompatible

论坛徽章:
0
4 [报告]
发表于 2009-06-17 09:46 |只看该作者
我刚看到回复的信息,我还是不太明白,链接中所说的,能否有个例子说明一下,多谢!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP