简体   繁体   中英

Error in SQL statement for Derby database

I'm havin an error while trying to execute this piece of sql code... The error I'm getting is:

Encountered "(" at line 1, column 45

The piece of code is:

ALTER TABLE APP.RESPOSTAS ADD coluna" + (numColumns + 1) + " INTEGER(1) AFTER coluna" + numColumns;

Can anyone help me?

Thank you all!

According to The derby details for INTEGER you don't need the (1) in there.

ALTER TABLE APP.RESPOSTAS ADD coluna" + (numColumns + 1) + " INTEGER 

should work?

edited to remove the AFTER section as it doesn't look like derby supports that either. here are the derby details for ALTER TABLE

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM