TFS_ANTIGUO/TPAtesa_Vitalit/BE/InventarioV2/Tablas/General.Persona.Table.sql
2026-06-26 09:45:23 -06:00

48 lines
3.5 KiB
Transact-SQL
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

USE [InventarioV2]
GO
/****** Object: Table [General].[Persona] Script Date: 23/12/2020 02:53:58 p.m. ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [General].[Persona](
[Id_Persona] [int] NOT NULL,
[id_Tipo_Identificacion] [int] NULL,
[Identificacion] [varchar](50) NOT NULL,
[Nombre] [varchar](100) NULL,
[Primer_Apellido] [varchar](100) NULL,
[Segundo_Apellido] [varchar](100) NOT NULL,
[Telefono] [varchar](20) NULL,
[Correo] [varchar](150) NULL,
[Dirección] [varchar](255) NULL,
[Estado] [bit] NOT NULL,
[Fecha_Creacion] [datetime] NOT NULL,
[Usuario_Creador] [int] NOT NULL,
[Fecha_Modificacion] [datetime] NULL,
[Usuario_Modificador] [int] NULL,
CONSTRAINT [PK_Persona] PRIMARY KEY CLUSTERED
(
[Id_Persona] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
ALTER TABLE [General].[Persona] WITH CHECK ADD CONSTRAINT [FK_Persona_Tipo_Identificacion] FOREIGN KEY([id_Tipo_Identificacion])
REFERENCES [Catalogo].[Tipo_Identificacion] ([Id_Tipo_Identificacion])
GO
ALTER TABLE [General].[Persona] CHECK CONSTRAINT [FK_Persona_Tipo_Identificacion]
GO
ALTER TABLE [General].[Persona] WITH CHECK ADD CONSTRAINT [FK_Persona_Usuario_Cre] FOREIGN KEY([Usuario_Creador])
REFERENCES [Seguridad].[Usuario] ([Id_Usuario])
GO
ALTER TABLE [General].[Persona] CHECK CONSTRAINT [FK_Persona_Usuario_Cre]
GO
ALTER TABLE [General].[Persona] WITH CHECK ADD CONSTRAINT [FK_Persona_Usuario_Mod] FOREIGN KEY([Usuario_Modificador])
REFERENCES [Seguridad].[Usuario] ([Id_Usuario])
GO
ALTER TABLE [General].[Persona] CHECK CONSTRAINT [FK_Persona_Usuario_Mod]
GO