Can we DELETE records based on JOIN.
that is delete records which are common between the tables.
Ex:
Delete from table_A join table_b
on a.col1=b.col1;
i am getting an error 4856: Syntax error at or near "join"
DELETE using JOIN, is that possible in Vertica?
Moderator: NorbertKrupa
- JimKnicely
- Site Admin
- Posts: 1825
- Joined: Sat Jan 21, 2012 4:58 am
- Contact:
Re: DELETE using JOIN, is that possible in Vertica?
Hi!
You must have been using MySQL where that syntax is ok
This DELETE statement will do the same thing in Vertica:
Please make sure to test it!
You must have been using MySQL where that syntax is ok

This DELETE statement will do the same thing in Vertica:
Code: Select all
DELETE FROM table_A
WHERE EXISTS (SELECT NULL
FROM table_b
WHERE table_b.col1 = table_A.col1);
Jim Knicely

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
Re: DELETE using JOIN, is that possible in Vertica?
Oh ya... co-related...
Thanks... this works...
Thanks... this works...