DB2 Luw 支持 CHAR 语义吗?
Oracle创建表时支持Byte和Char语义
Create table test(n varchar2(10 byte);
创建表 test(n varchar2(10 char);
DB2 Luw 是否支持带有 char 语义的第二个创建语句?
如果我们知道第 n 列中的某些值可能需要多个字节而我不知道,我们可以在 DB2 Luw 中做什么?不想使用 nvarchar?
Oracle supports Byte and Char Semantic when creating table
Create table test(n varchar2(10 byte);
Create table test(n varchar2(10 char);
Does DB2 Luw support the second create statement with char Semantic?
What can we do in DB2 Luw if we know that some values in the column n may require more than one byte and i don't want to use nvarchar?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当前支持的 Db2-LUW 版本在正确配置为模拟 Oracle 时将接受以下语法:
Create table test(n varchar2(10 byte);
和
Create table test(n varchar2(10 char) );
默认情况下,Db2-LUW 安装不会启用 Oracle 兼容性,但您可以按照 文档
。根据您的需要在设置注册表变量DB2_COMPATIBILITY_VECTOR之后创建此配置活动通常由 DBA 完成(
如果您的 Db2 数据库没有) 。支持此语法,那么当您尝试使用 Oracle 语法时,Db2-LUW 将报告错误 SQL0104N。
Currently supported versions of Db2-LUW when correctly configured to emulate Oracle will then accept the syntax:
Create table test(n varchar2(10 byte);
and
Create table test(n varchar2(10 char);
By default, Db2-LUW installations will not enable Oracle compatibility, but you can change this by following the documentation.
Remember that a new database has to be created after you set the registry variable DB2_COMPATIBILITY_VECTOR according to your needs. This configuration activity is normally done by a DBA.
If your Db2-database does not support this syntax, then Db2-LUW will report the error SQL0104N when you try to use Oracle syntax.