USE [DD_ECM]
GO

/****** Object:  Table [dbo].[TBCUST_XAP_KUNDENSTAMM]    Script Date: 19.03.2024 16:48:02 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[TBCUST_XAP_KUNDENSTAMM](
	[GUID] [bigint] IDENTITY(1,1) NOT NULL,
	[Kundennummer] [nvarchar](255) NULL,
	[Objektnummer] [nvarchar](255) NULL,
	[Versorgungsart] [nvarchar](255) NULL,
	[rAdressart] [nvarchar](255) NULL,
	[rAnrede] [nvarchar](255) NULL,
	[rNAME1] [nvarchar](255) NULL,
	[rNAME2] [nvarchar](255) NULL,
	[rStraße] [nvarchar](255) NULL,
	[rHausnummer] [nvarchar](255) NULL,
	[rPostfach] [nvarchar](255) NULL,
	[rPLZ] [nvarchar](255) NULL,
	[rOrt] [nvarchar](255) NULL,
	[rTelefon] [nvarchar](255) NULL,
	[rMail] [nvarchar](255) NULL,
	[vAdressart] [nvarchar](255) NULL,
	[vAnrede] [nvarchar](255) NULL,
	[vNAME1] [nvarchar](255) NULL,
	[vNAME2] [nvarchar](255) NULL,
	[vStraße] [nvarchar](255) NULL,
	[vHausnummer] [nvarchar](255) NULL,
	[vPostfach] [nvarchar](255) NULL,
	[vPLZ] [nvarchar](255) NULL,
	[vOrt] [nvarchar](255) NULL,
	[vTelefon] [nvarchar](255) NULL,
	[vMail] [nvarchar](255) NULL,
	[ADDED_WHO] [varchar](50) NOT NULL,
	[ADDED_WHEN] [datetime] NOT NULL,
	[CHANGED_WHO] [varchar](50) NULL,
	[CHANGED_WHEN] [datetime] NULL,
 CONSTRAINT [PK_TBCUST_XAP_KUNDENSTAMM] PRIMARY KEY CLUSTERED 
(
	[GUID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[TBCUST_XAP_KUNDENSTAMM] ADD  CONSTRAINT [DF_TBCUST_XAP_KUNDENSTAMM_ADDED_WHO]  DEFAULT ('DEFAULT') FOR [ADDED_WHO]
GO

ALTER TABLE [dbo].[TBCUST_XAP_KUNDENSTAMM] ADD  CONSTRAINT [DF_TBCUST_XAP_KUNDENSTAMM_ADDED_WHEN]  DEFAULT (getdate()) FOR [ADDED_WHEN]
GO


