i am trying to modify an insert statement in Redshift. I added a column at the end of table. Previous last column is one of type integer, which I do not need to handle in my insert (has remained null so far). Can I insert null values to it somehow? The 'NULL AS[...]' expression obviously fails, with error message:
Amazon Invalid operation: column "search_result_size" is of type integer but expression is of type text;
Alternatively, I will try to skip this column during insert statement, but I prefer to declare its value as null each time. I have been searching this for quite some time now, no solution found so far. Any ideas would be greatly welcome.
Thank you!
null
, egINSERT INTO t(a, b) SELECT 1, null;
. Adding quotes around it makes it atext
value. – Marth