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

	CREATE TABLE [dbo].[PG_TIPO_FORN](
		[CD_EMP] [int] NOT NULL,
		[CD_TP_LANC] [int] NOT NULL,
		[CD_TP_FORN] [int] NOT NULL,
		[DS_LANC] [varchar](100) NULL,
		[DS_TP_LANC] [varchar](100) NULL,
	 CONSTRAINT [PK_PG_TIPO_FORN] PRIMARY KEY CLUSTERED 
	(
		[CD_EMP] ASC,
		[CD_TP_LANC] ASC
	)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
	) ON [PRIMARY]


	SET ANSI_PADDING OFF


	ALTER TABLE [dbo].[PG_TIPO_FORN] ADD  CONSTRAINT [DF_PG_TIPO_FORN_CD_TP_LANC]  DEFAULT ((0)) FOR [CD_TP_LANC]


	ALTER TABLE [dbo].[PG_TIPO_FORN] ADD  CONSTRAINT [DF_PG_TIPO_FORN_DS_LANC]  DEFAULT ('') FOR [DS_LANC]


	ALTER TABLE [dbo].[PG_TIPO_FORN] ADD  CONSTRAINT [DF_PG_TIPO_FORN_DS_TP_LANC]  DEFAULT ('') FOR [DS_TP_LANC]

END

