
/****** Object:  Table [dbo].[ter_tercero_sector]    Script Date: 07/15/2013 08:50:17 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

if not exists(select * FROM INFORMATION_SCHEMA.TABLES  where Table_Name='ter_tercero_sector')
begin


EXEC _ini_creartabla 'ter_tercero_sector', 1

alter table [ter_tercero_sector] add [id_tercero] int NOT NULL DEFAULT 0

alter table [ter_tercero_sector] add [id_sector] int NOT NULL DEFAULT 0



ALTER TABLE [ter_tercero_sector]  WITH CHECK ADD  CONSTRAINT [FK_ter_tercero_sector_id_tercero] FOREIGN KEY([id_tercero])
REFERENCES [ter_tercero] ([id])


ALTER TABLE [ter_tercero_sector]  WITH CHECK ADD  CONSTRAINT [FK_ter_tercero_sector_id_sector] FOREIGN KEY([id_sector])
REFERENCES [ter_sector] ([id])


end
GO

SET ANSI_PADDING OFF
GO

