IF NOT EXISTS(SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='STONE_BANKING_CONTA_STONE_DDA') 
BEGIN

	CREATE TABLE STONE_BANKING_CONTA_STONE_DDA (
		ID_CONTA_STONE varchar(50) NOT NULL,
		CD_STATUS_DDA tinyint NOT NULL,
		CONSTRAINT STONE_BANKING_CONTA_STONE_DDA_PK PRIMARY KEY (ID_CONTA_STONE)
	);

	ALTER TABLE STONE_BANKING_CONTA_STONE_DDA ADD CONSTRAINT STONE_BANKING_CONTA_STONE_DDA_FK FOREIGN KEY (CD_STATUS_DDA) REFERENCES STONE_BANKING_ENUM_STATUS_DDA(CD_STATUS_DDA);

END
GO