在derby中更改自动递增1的表列 [英] Alter a table column with auto increment by 1 in derby

查看:103
本文介绍了在derby中更改自动递增1的表列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在德比Netbeans创建了一个表,现在我意识到,我需要使列自动增加1,这是一个主键。我怎么能这样做?我试过下面的代码,但是是徒劳的。

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?

推荐答案

我发现了一个替代解决方案,我从数据库中删除了列(感谢vels4j)再次从netbeans derby UI添加列如下所示:

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:

这篇关于在derby中更改自动递增1的表列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆