如果使用"create“创建Oracle表,其中一个字段为null,则将得到以下错误:
ORA-01723:不允许零长度列。
示例查询:
create table mytable as
select
field_a,
null brand_new_field
from anothertable;你怎么能绕过这件事?
发布于 2016-05-24 15:11:44
明白了需要使用cast(null as datatype)
create table mytable as
select
field_a,
cast(null as varchar(1)) brand_new_field
from anothertable;更多的信息,这里。
发布于 2018-02-26 09:42:31
这是解决这个问题的方法之一。
create table mytable as
select
field_a,
' ' brand_new_field
from anothertable;https://stackoverflow.com/questions/37417471
复制相似问题