SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[profassociation]( [profid] [char](5) NOT NULL, [associationname] [varchar](500) NULL, [acronym] [varchar](100) NULL, [associationurl] [varchar](500) NULL, [certification] [char](1) NULL, [careercenterURL] [varchar](500) NULL, [lastupdate] [char](6) NULL, PRIMARY KEY CLUSTERED ( [profid] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO SET ANSI_PADDING OFF GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[profassnxind]( [profid] [char](5) NOT NULL, [stfips] [char](2) NOT NULL, [codetype] [char](2) NOT NULL, [indcode] [char](6) NOT NULL, CONSTRAINT [PK_profassnxind] PRIMARY KEY CLUSTERED ( [profid] ASC, [stfips] ASC, [codetype] ASC, [indcode] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO SET ANSI_PADDING OFF GO ALTER TABLE [dbo].[profassnxind] WITH CHECK ADD CONSTRAINT [FK_profassnxind_indcodes] FOREIGN KEY([stfips], [codetype], [indcode]) REFERENCES [dbo].[indcodes] ([stfips], [codetype], [code]) GO ALTER TABLE [dbo].[profassnxind] CHECK CONSTRAINT [FK_profassnxind_indcodes] GO ALTER TABLE [dbo].[profassnxind] WITH CHECK ADD CONSTRAINT [FK_profassnxind_profassociation] FOREIGN KEY([profid]) REFERENCES [dbo].[profassociation] ([profid]) GO ALTER TABLE [dbo].[profassnxind] CHECK CONSTRAINT [FK_profassnxind_profassociation] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[profassnxocc]( [profid] [char](5) NOT NULL, [stfips] [char](2) NOT NULL, [codetype] [char](2) NOT NULL, [occcode] [char](10) NOT NULL, CONSTRAINT [PK_profassnxocc] PRIMARY KEY CLUSTERED ( [profid] ASC, [stfips] ASC, [codetype] ASC, [occcode] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO SET ANSI_PADDING OFF GO ALTER TABLE [dbo].[profassnxocc] WITH CHECK ADD CONSTRAINT [FK_profassnxind_occcodes] FOREIGN KEY([stfips], [codetype], [occcode]) REFERENCES [dbo].[occcodes] ([stfips], [CODETYPE], [CODE]) GO ALTER TABLE [dbo].[profassnxocc] CHECK CONSTRAINT [FK_profassnxind_occcodes] GO ALTER TABLE [dbo].[profassnxocc] WITH CHECK ADD CONSTRAINT [FK_profassnxocc_profassociation] FOREIGN KEY([profid]) REFERENCES [dbo].[profassociation] ([profid]) GO ALTER TABLE [dbo].[profassnxocc] CHECK CONSTRAINT [FK_profassnxocc_profassociation] GO