if not exists (select* from sys.tables where name = 'EST_NF_ENT_PEND_ENV_INTEGRACAO_ITEM') 

begin 
CREATE TABLE EST_NF_ENT_PEND_ENV_INTEGRACAO_ITEM(
    ID_CTR_IT  INT IDENTITY(1,1) NOT NULL,
	ID_CTR     INT NOT NULL,
	CD_PROD    INT NOT NULL,
	EAN        VARCHAR(15) NOT NULL,
	DS_PROD    VARCHAR(255) NOT NULL,
	QTDE       MONEY NOT NULL,
	VLR_CUSTO  MONEY NOT NULL,
 CONSTRAINT [PK_EST_NF_ENT_PEND_ENV_INTEGRACAO_ITEM] PRIMARY KEY CLUSTERED 
(
	[ID_CTR_IT] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY];


ALTER TABLE [dbo].[EST_NF_ENT_PEND_ENV_INTEGRACAO_ITEM]  WITH CHECK ADD  CONSTRAINT [FK_EST_NF_ENT_PEND_ENV_INTEGRACAO_ITEM_EST_NF_ENT_PEND_ENV_INTEGRACAO] FOREIGN KEY(ID_CTR) REFERENCES [dbo].[EST_NF_ENT_PEND_ENV_INTEGRACAO] (ID_CTR);
ALTER TABLE [dbo].[EST_NF_ENT_PEND_ENV_INTEGRACAO_ITEM] CHECK CONSTRAINT [FK_EST_NF_ENT_PEND_ENV_INTEGRACAO_ITEM_EST_NF_ENT_PEND_ENV_INTEGRACAO]

end ; 