How to insert rows with NULL values to a DolphinDB table?

14 views Asked by At

I want to insert a record to a table with columns “A”, “B”, and “C”. In this record, the “B” column contains a NULL value. When I used table(12 as A, NULL as B, 13 as C), I encountered an error: Not allowed to create void vector. Does anyone know how to solve this issue?

1

There are 1 answers

0
Eva Gao On BEST ANSWER

You need to use the appropriate NULL value representation based on the data type of the “B“ column. For example:

If the “B“ column is of INT type, use 00i:

table(12 as A, 00i as B, 13 as C)

If the “B“ column is of SYMBOL type, use '':

table(12 as A, '' as B, 13 as C)