
IF NOT EXISTS(SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='EST_PED_CP_PG_FORN_FORN_VINCULADO') 

BEGIN
CREATE TABLE [DBO].[EST_PED_CP_PG_FORN_FORN_VINCULADO](
	[CD_EMP] [INT] NOT NULL,
	[CD_FILIAL] [INT] NOT NULL,
	[CD_PED] [INT] NOT NULL,	
	[CD_FORN] [INT] NOT NULL,
	[PERC_DESC] [MONEY],
	[CD_COND_PGTO] [INT] NOT NULL,
 CONSTRAINT [PK_EST_PED_CP_PG_FORN_FORN_VINCULADO] PRIMARY KEY CLUSTERED 
(
	[CD_EMP] ASC,
	[CD_FILIAL] ASC,
	[CD_PED] ASC,
	[CD_FORN] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY];

END

