On Apr 7, 8:02 pm, gabjos <[email protected]> wrote: > I have a delete statement that is giving me errors in H2. How do I > modify it for H2? > > Here it is: > > DELETE FROM multi_pages pages INNER JOIN bib_holdings bh ON bh.id = > multi_pages.id WHERE bh.pdf_name = 'ak-1'
Rows from which table do you want to delete? In MySql you'd need to write something like DELETE t1 FROM t1 JOIN t2 ... but this is actually an updatable view and AFAIK doesn't work with H2. So you probably need something like DELETE FROM multi_pages pages WHERE EXISTS (SELECT 0 FROM bib_holdings bh WHERE bh.id = multi_pages.id AND bh.pdf_name = 'ak-1') -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
