if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[合同变动子集_劳动合同编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[合同变动子集] DROP CONSTRAINT 合同变动子集_劳动合同编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[合同补充子集_劳动合同编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[合同补充子集] DROP CONSTRAINT 合同补充子集_劳动合同编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[合同解除子集_劳动合同编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[合同解除子集] DROP CONSTRAINT 合同解除子集_劳动合同编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[合同续签子集_劳动合同编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[合同续签子集] DROP CONSTRAINT 合同续签子集_劳动合同编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[合同终止子集_劳动合同编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[合同终止子集] DROP CONSTRAINT 合同终止子集_劳动合同编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[劳动争议子集_劳动合同编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[劳动争议子集] DROP CONSTRAINT 劳动争议子集_劳动合同编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[干部调整与交流子集_职员编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[干部调整与交流子集] DROP CONSTRAINT 干部调整与交流子集_职员编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[个人简历子集_职员编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[个人简历子集] DROP CONSTRAINT 个人简历子集_职员编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[个人年度汇总台帐子集_职员编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[个人年度汇总台帐子集] DROP CONSTRAINT 个人年度汇总台帐子集_职员编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[合同管理子集_职员编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[合同管理子集] DROP CONSTRAINT 合同管理子集_职员编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[兼任职务子集_职员编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[兼任职务子集] DROP CONSTRAINT 兼任职务子集_职员编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[军转干部子集_职员编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[军转干部子集] DROP CONSTRAINT 军转干部子集_职员编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[离休退休子集_职员编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[离休退休子集] DROP CONSTRAINT 离休退休子集_职员编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[社会保险子集_职员编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[社会保险子集] DROP CONSTRAINT 社会保险子集_职员编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[生育保险信息子集_职员编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[生育保险信息子集] DROP CONSTRAINT 生育保险信息子集_职员编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[失业保险信息子集_职员编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[失业保险信息子集] DROP CONSTRAINT 失业保险信息子集_职员编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[行政党派职务子集_职员编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[行政党派职务子集] DROP CONSTRAINT 行政党派职务子集_职员编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[行政及党内惩罚_职员编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[行政及党内惩罚] DROP CONSTRAINT 行政及党内惩罚_职员编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[行政及党内奖励_职员编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[行政及党内奖励] DROP CONSTRAINT 行政及党内奖励_职员编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[学历及学位子集_职员编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[学历及学位子集] DROP CONSTRAINT 学历及学位子集_职员编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[养老保险信息子集_职员编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[养老保险信息子集] DROP CONSTRAINT 养老保险信息子集_职员编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[医疗保险子集_职员编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[医疗保险子集] DROP CONSTRAINT 医疗保险子集_职员编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[政治面貌及党籍情况_职员编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[政治面貌及党籍情况] DROP CONSTRAINT 政治面貌及党籍情况_职员编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[职工参险信息子集_职员编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[职工参险信息子集] DROP CONSTRAINT 职工参险信息子集_职员编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_职员离职登记表_职员基本信息表]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[职员离职登记表] DROP CONSTRAINT FK_职员离职登记表_职员基本信息表
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[职员主要关系人信息表_职员编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[职员主要关系人信息表] DROP CONSTRAINT 职员主要关系人信息表_职员编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[主要论文著作子集_职员编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[主要论文著作子集] DROP CONSTRAINT 主要论文著作子集_职员编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[住房公积金子集_职员编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[住房公积金子集] DROP CONSTRAINT 住房公积金子集_职员编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[专业技术职务子集_职员编号_fk]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[专业技术职务子集] DROP CONSTRAINT 专业技术职务子集_职员编号_fk
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[上年工资统计]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[上年工资统计]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[专业技术职务子集]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[专业技术职务子集]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[个人年度汇总台帐子集]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[个人年度汇总台帐子集]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[个人所得税表]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[个人所得税表]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[个人简历子集]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[个人简历子集]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[主要论文著作子集]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[主要论文著作子集]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[人事变更历史表]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[人事变更历史表]