The Vertica Forum recently got a makeover! Let us know what you think by filling out this short, anonymous survey.
Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!
How to INSERT INTO with SELECT and default values

Hi friends, can't find related material online.
Question, I have a table with column a, b and c, a is a sequence and b is defaulted to be say 0.
I take column c from a SELECT clause.
How do I do this kind of things?
I tried:
INSERT INTO table
SELECT
default,
default,
c
FROM whatever
This doesn't work. Any idea? Thanks!
0
Answers
It seems that I cannot SELECT default. If I can't do that how am I supposed to INSERT into any table with less columns?
Just specify the columns into which you actually want to insert something:
Thanks, it works! Perfect~~