tags:

views:

23

answers:

1

Hey, everyone!

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!

+1  A: 

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

John Gardner
Not workin Yet... Now I have the following error:"Encountered "AFTER" at line 1, column 46"
Eric
You don't get to control the column order, either, so remove "after coluna+numColumns" from the statement, too. Your statement should just be: alter table app.respostas add columnaN
Bryan Pendleton