我在终端上运行了以下 db2 脚本,没有问题。但是当我尝试访问与该表相关的实际前端页面时,我收到错误(代码57016),表明该表处于非活动状态。我重新启动了 db2,但这个问题仍然存在。
任何人都可以在这里帮助我吗
alter table CUSTOMER alter column Delivery set default 0!
alter table CUSTOMER alter column Delivery set not null!
alter table CUSTOMER add constraint pref_ck4 check (Delivery between 0 and 1)!
commit!
quit!
回滚是:
alter table CUSTOMER alter Delivery drop DEFAULT!
alter table CUSTOMER alter COLUMN Delivery drop NOT NULL!
alter table CUSTOMER drop constraint pref_ck4!
reorg table CUSTOMER!
commit!
quit!
我收到的错误:
UncategorisedDatabaseException: Query=[SELECT * FROM CUSTOMER WHERE ID = ?], database vendor error message is: DB2 SQL error: SQLCODE: -668, SQLSTATE: 57016, SQLERRMC: 7;CUSTOMER, UncategorisedDatabaseException errorCode = -668
db2 => ? 57016
SQLSTATE 57016: The table cannot be accessed, because it is inactive.