 

/****** Object:  Table [dbo].[EST_PED_CP_PG_FORN_ORD_DEFAULT]    Script Date: 09/16/2013 14:35:25 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[EST_PED_CP_PG_FORN_ORD_DEFAULT](	
	[CD_EMP] [int] NOT NULL,
	[CD_ORD_DEFAULT] [int] NOT NULL,
	[CD_FORN] [int] NOT NULL,	
 CONSTRAINT [PK_EST_PED_CP_PG_FORN_ORD_DEFAULT] PRIMARY KEY CLUSTERED 
(
	[CD_EMP] ASC,
	[CD_ORD_DEFAULT] 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

ALTER TABLE [dbo].[EST_PED_CP_PG_FORN_ORD_DEFAULT]  WITH CHECK ADD  CONSTRAINT [FK_EST_PED_CP_PG_FORN_ORD_DEFAULT_PG_FORN] FOREIGN KEY([CD_EMP], [CD_FORN])
REFERENCES [dbo].[PG_FORN] ([CD_EMP], [CD_FORN])
ON UPDATE CASCADE
GO

ALTER TABLE [dbo].[EST_PED_CP_PG_FORN_ORD_DEFAULT] CHECK CONSTRAINT [FK_EST_PED_CP_PG_FORN_ORD_DEFAULT_PG_FORN]
GO

