【发布时间】:2021-11-23 03:30:36
【问题描述】:
我有一个如下创建的 DB2(用于 IBMi)表。我想在 SQLRPGLE 程序中运行时删除外键约束。这可能吗?
create table grid_action_details(id integer not null
generated always as identity
(start with 1 increment by 1)
PRIMARY KEY,grid_details_id integer,foreign key(grid_details_id)
references grid_details(id),action_code_details_id integer,
foreign key(action_code_details_id)
references action_code_details(id),action_code_status varchar(2),
created_date date default
current_date,created_by varchar(30),
last_updated_date date default current_date,updated_by
varchar(30),required_parameter clob);
我尝试了以下语法,但它似乎对我不起作用:
ALTER TABLE table-name
DROP FOREIGN KEY foreign_key_name
alter table iesqafile.grid_action_details
drop foreign key action_code_details_id
ACTION_CODE_DETAILS_ID in IESQAFILE type *N not found.
【问题讨论】:
标签: db2-400