The query below works fine in MySQL, but H2DB in Mysql compatibility mode doesn't like it. How do i rewrite it so that both MySQL and H2DB accept it: Thanks!
set @var=if((SELECT true FROM information_schema.TABLE_CONSTRAINTS WHERE CONSTRAINT_SCHEMA = DATABASE() AND TABLE_NAME = 'hidden_intent_mappings' AND CONSTRAINT_NAME = 'hidden_intent_mappings_ibfk_1' AND CONSTRAINT_TYPE = 'FOREIGN KEY') = true,'ALTER TABLE hidden_intent_mappings DROP FOREIGN KEY `hidden_intent_mappings_ibfk_1`','ALTER TABLE hidden_intent_mappings DROP FOREIGN KEY `manual_sentence_fk`'); prepare stmt from @var; execute stmt; deallocate prepare stmt; -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com. Visit this group at https://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.