sql 增加键约束 删除主记录在其他表中的相关记录
ALTER TABLE [dbo].[t_workflow_approval] WITH CHECK ADD CONSTRAINT [FK_t_workflow_approval_t_workflow_form] FOREIGN KEY([indexid])
REFERENCES [dbo].[t_workflow_form] ([id])
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[t_workflow_approval] CHECK CONSTRAINT [FK_t_workflow_approval_t_workflow_form]
GO