Why does this statement work fine in workbench but not in Java.
SET @sqlstmt := IF( @exist <= 0, 'select ''INFO: Key does not exist.''', 'ALTER TABLE `SOMETABLE` DROP FOREIGN KEY `SOMEKEY`');
In Java I get
MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET @sqlstmt := IF( @exist <= 0, 'select ''INFO: Key does not exist.''', 'ALTER ' at line 1
"instead of two single quotes?