我正在尝试使用System i Navigator(AS400)将列数据类型从NUMERIC(1,0)修改为CHARACTER(1)但是我收到一条消息错误:
SQL State: 42837
Message: [SQL0190] Attributes of column Col1 in Table1 in Library1 not
compatible. Cause . . . . . : The attributes specified for column Col1 in
Table1 in Library1 are not compatible with the attributes of the existing
column. Either the data type, the length, or the clause is not valid. -- A
numeric column cannot be changed to a type that is not numeric. -- A
character column cannot be changed to a DATE, TIME, TIMESTAMP, or a numeric
column. --
是否有更新列的数据类型而不必删除它并再次添加? 我可以做到但问题是我必须删除之后定义的所有列,以便以相同的顺序添加它们。 此表目前不包含数据。
答案 0 :(得分:0)
我发现有两种方法可以解决此问题,而无需手动重新创建表格: