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!
Optimized merge with composite primary key
Is it possible to execute an optimized merge with multiple columns in on clause where the target table has a composite key?
Something similar to
MERGE INTO table1 t1 USING table2 t2 on (t1.col1 = t2.col1 and t1.col2 = t2.col2)
WHEN MATCHED THEN UPDATE SET col1 = t2.col1, col2 = t2.col2
where t1 has a primary key defined as CONSTRAINT composite_pk PRIMARY KEY (col1, col2)
0
Comments
Yes. It is possible absolutly