IF NOT  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[seg_sesionHistorico]') AND type in (N'U'))
CREATE TABLE [dbo].[seg_sesionHistorico](
	[id] [int] NOT NULL,
	[uid] [varchar](500) NOT NULL,
	[eid] [varchar](50) NOT NULL,
	[id_usuario_modifico] [int] NOT NULL,
	[id_usuario_creo] [int] NOT NULL,
	[fechaModificacion] [datetime] NOT NULL,
	[fechaCreacion] [smalldatetime] NOT NULL,
	[active] [bit] NOT NULL,
	[sesion] [varchar](300) NOT NULL,
	[sesion_codigo] [varchar](100) NULL)
GO

