IF OBJECT_ID('EST_ALCADA_MARGEM') IS NULL
	BEGIN 
		CREATE TABLE [dbo].[EST_ALCADA_MARGEM](
			[CD_ALCADA] [int] NOT NULL,
			[DS_ALCADA_MARGEM] [varchar](100) NOT NULL,
			[CD_USU] [int] NULL,
			[DT_CAD] [datetime] NULL,
			[DT_ULT_ALT] [datetime] NULL,
		 CONSTRAINT [PK_EST_ALCADA_MARGEM] PRIMARY KEY CLUSTERED 
		(
			[CD_ALCADA] ASC
		)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
		) ON [PRIMARY]


		ALTER TABLE [dbo].[EST_ALCADA_MARGEM]  WITH CHECK ADD  CONSTRAINT [FK_EST_ALCADA_MARGEM_GLB_USU] FOREIGN KEY([CD_USU])
		REFERENCES [dbo].[GLB_USU] ([CD_USU])
 
		ALTER TABLE [dbo].[EST_ALCADA_MARGEM] CHECK CONSTRAINT [FK_EST_ALCADA_MARGEM_GLB_USU]
 
	END

