IF NOT EXISTS ( SELECT * FROM SYS.OBJECTS WHERE NAME = 'EST_NF_ENT_DANFE_CTE_REM' )
BEGIN 


	CREATE TABLE [DBO].[EST_NF_ENT_DANFE_CTE_REM] (
	  [CD_CTR]		INT NOT NULL,
	  [CNPJ_CPF]	VARCHAR(20) COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS,
	  [IE]			VARCHAR(20) COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS,
	  [XNOME]		VARCHAR(350)COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS ,
	  [XLGR]		VARCHAR(350)COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS ,
	  [NRO]			VARCHAR(30) COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS,
	  [XBAIRRO]		VARCHAR(100)COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS ,
	  [CMUN]		INT NULL,
	  [XMUN]		VARCHAR(20) COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS,
	  [CEP]			INT  ,
	  [UF]			VARCHAR(10) COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS,
	  [FONE]		VARCHAR(20) COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS,
	  [CPAIS]		INT,
	  [XPAIS]		VARCHAR(20) COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS,
	  CONSTRAINT [EST_NF_ENT_DANFE_CTE_REM_FK] FOREIGN KEY ([CD_CTR]) REFERENCES [DBO].[EST_NF_ENT_DANFE_CTE] ([CD_CTR]) 
	  ON UPDATE NO ACTION
	  ON DELETE CASCADE
	)
	ON [PRIMARY]



END 

