Options

Adding to a former post ¨¨How to add a new column to a table efficiently?¨

kfruchtmankfruchtman Vertica Customer

Hi !
I followed the next post :smile:
https://forum.vertica.com/discussion/241554/how-to-add-a-new-column-to-a-table-efficiently
The post is very very helpful on how to add a column to a table and populate it with the help of another table.
I want to ask a question regarding the future population of this column.This solution is for all the existing rows in table.How can I do an automated process that can populate this column everytime the table is updated?
e.g - lets say the mickey table given on the above link post is now updated from an external source but the columns updated are always without the "months_worked" column added by the helper table.
How can I make sure that each row that is updated from this point forward is also poplulated with the value for the ""months_worked" " column.
Is there an automated process I can run? automated update somehow? automated db procedure?
Thanks in advance!
Keren

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file