
IF NOT EXISTS ( SELECT* FROM SYS.OBJECTS WHERE NAME = 'PG_FORN_AUDIT')
BEGIN 
      CREATE TABLE PG_FORN_AUDIT (
    	 CD_CTR			INT IDENTITY (1,1)
    	,CD_EMP			INT
    	,CD_FILIAL		INT
      	,CD_FORN		INT 
    	,RZ_FORN		VARCHAR(225) COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS
    	,NM_FANT		VARCHAR(225) COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS
    	,CD_CID			INT
    	,END_FORN		VARCHAR(200) COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS
    	,BAIRRO_FORN	VARCHAR(50) COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS
    	,DT_CAD_AUDIT	SMALLDATETIME
    	,CD_USU			INT
    	,DT_CAD			DATETIME)	
END 