一楼我回复个。作者: 张兴康 时间: 2020-7-28 08:49 标题: 度量快速开发平台:解决注册ID一样的问题 解决注册人员时,ID值一样的问题
delete from address_book where userid not in (select id from sa_staff_info);
delete from sa_staff_role where user_id not in (select id from sa_staff_info);
delete from sa_staff_role where dept_id not in (select dept_id from sa_dept_dict);
alter table SA_STAFF_INFO add constraint PK_SA_STAFF_INFO_ID unique(ID);
alter table ADDRESS_BOOK add constraint FK_address_book_uid foreign key(USERID) references sa_staff_info(ID) on delete cascade;