I have setup DB2 v22.214.171.124 in a Docker container and accessed it via DBeaver.
I want to run a script with a
CREATE PROCEDURE statement on DB2 database.
But it returns
SQL Error : An unexpected token "END-OF-STATEMENT" was found following "E IF EXISTS TEMP_IDS".
The sample script I tried is here.
--#SET DELIMITER $$ CREATE PROCEDURE create_new_temp_ids_table () BEGIN DROP TABLE IF EXISTS TEMP_IDS; CREATE TABLE TEMP_IDS ( TEMP_ID VARCHAR (20) NOT NULL, NAME VARCHAR (100), PRIMARY KEY (TEMP_ID)); END$$
How can I solve this delimiter issue in DB2 script? I think the issue with changing the delimiter.
Source: Docker Questions