增加一列类型为double的NULL列有以下方法:
select a,b,00F as col from t select a,b,double(NULL) as col from t select a,b,double() as col from t
假设我有一张DolphinDB内存表如下:
t = table(1..3 as a, `a`b`c as b) >t a b 1 a 2 b 3 c
现在想增加一列全是NULL,如下所示:
a b col 1 a NULL 2 b NULL 3 c NULL
尝试select a,b,NULL as col from t,但执行提示:
Not allowed to create void vector.
但执行如下语句,却可以得到全0列:
select a,b,0 as col from t a b col 1 a 0 2 b 0 3 c 0
为什么0换成NULL就不行?
增加一列类型为double的NULL列有以下方法:
select a,b,00F as col from t select a,b,double(NULL) as col from t select a,b,double() as col from t