Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alter a table column with auto increment by 1 in derby

I have created a table in derby Netbeans and now i realize that i need to make a column as auto incremented by 1 which is a primary key. How can i do so? I tried the following code but was in vain.

ALTER TABLE ISSUERECIPT ALTER IRCODE SET INCREMENT BY 1;

Do i need to create the table once again or can it be possible some other way?

like image 759
Nitesh Verma Avatar asked Jan 14 '13 09:01

Nitesh Verma


1 Answers

I have found an alternate solution, i dropped the column from the database (thanks vels4j) added the column once again from the netbeans derby UI as shown below:

enter image description here

like image 156
Nitesh Verma Avatar answered Oct 21 '22 12:10

Nitesh Verma