sql - How to Truncate table in DB2? Error: Not a valid Command Line Processor command -


running following statement in db2 clp (command window)

db2 "truncate table myschema.tablea immediate"

db21034e  command processed sql statement because not valid command line processor command.  during sql processing returned: sql0969n  there no message text corresponding sql error "-20356" in message file on workstation.  error returned module "sqlnqbe2" original tokens "myschema.tablea". 

can please tell me i'm doing wrong or i'm missing? i'm trying truncate single table , i'm getting following error message. not sure i'm doing wrong. i've tried with/without quotes, with/without schema, with/without immediate. i've tried in command editor (remove db2 , quotes) , still not working. i'm using: db2/aix64 9.7.9 also, have delete privilege able delete records want truncate.

thanks in advance!

the version of db2 client you're using doesn't seem match of server, why cannot see actual error message sqlcode -20356. if could, you'd see this:

the table myschema.tablea cannot truncated because delete triggers exist table, or table parent in referential constraint.

further explanation , suggested actions can found, usual, in fine manual.


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -

ios - Possible to get UIButton sizeThatFits to work? -