Oracle 中的 Number(5) 在 C# 中是什么意思

Number(5) in Oracle what is it meaning in C#

我创建了 table,其中一个列区域是 Number(5),

 PROJECT_CODE  NUMBER(5)  NOT NULL ,

当我在 C# 模型中输入它时,它看起来像;

  public global::System.Int16 PROJECT_CODE

我的问题是为什么它会到达 Int16,因为 int16 表示短,最大值是 "32767" 如果我的值是 32768 oracle 就可以了,但是 c# 呢?

因为 odpnet 有一个说明这种情况的规范。

oracle datatype mapping for .net

在代码执行中,如果您手动设置一个范围不正确的值,您可能会遇到问题。我建议使用相同的应用程序来设置值,以保证过程。