Hey everyone,
I am trying to run a simple SQL statement with DB2 and am having a few problems. I would like to have a single script in a txt/db2 file and have the engine process all of the commands
Here is the script:
CONNECT TO MYDB
CREATE TABLE PERSONS(
PID SMALLINT NOT NULL,
NAME VARCHAR(20) NOT NULL
)
TERMINATE
When I run a db2 -f /pathtofile I get:
SQL0104N An unexpected token "(" was found following "CREATE TABLE PERSONS".
Expected tokens may include: "END-OF-STATEMENT". SQLSTATE=42601
What am I doing wrong? Is there something wrong with my script? Also, why is it working without ";" terminators at the end of my statements?
Thank you,