IF  NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PG_CRED_CONC_DDA]') 	AND type in (N'U')) 
BEGIN

	SET ANSI_NULLS ON 
	SET QUOTED_IDENTIFIER ON 

	CREATE TABLE PG_CRED_CONC_DDA
		(
		CD_EMP int NOT NULL,
		CD_FILIAL int NOT NULL,
		CD_CTR int NOT NULL,
		ANO int NULL,
		PARC int NULL,
		DT_CAD datetime NULL,
		CD_USU int NULL
		)  ON [PRIMARY]
	
	ALTER TABLE PG_CRED_CONC_DDA ADD CONSTRAINT DF_PG_CRED_CONC_DDA_ANO DEFAULT 0 FOR ANO
	
	ALTER TABLE PG_CRED_CONC_DDA ADD CONSTRAINT DF_PG_CRED_CONC_DDA_PARC DEFAULT 0 FOR PARC
	
	ALTER TABLE PG_CRED_CONC_DDA ADD CONSTRAINT DF_PG_CRED_CONC_DDA_DT_CAD DEFAULT '' FOR DT_CAD
	
	ALTER TABLE PG_CRED_CONC_DDA ADD CONSTRAINT DF_PG_CRED_CONC_DDA_CD_USU DEFAULT 0 FOR CD_USU
	
	ALTER TABLE PG_CRED_CONC_DDA ADD CONSTRAINT PK_PG_CRED_CONC_DDA_1 PRIMARY KEY CLUSTERED 
		(
		CD_EMP,
		CD_FILIAL,
		CD_CTR
		) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]



END



