All pastes #813051 Raw Edit

xpg934

public sql v1 · immutable
·published 2007-12-12 06:26 UTC
rendered paste body
USE [df2]GO/****** Object:  Table [dbo].[Billing]    Script Date: 12/12/2007 09:25:55 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE TABLE [dbo].[Billing](	[ID] [int] IDENTITY(1,1) NOT NULL,	[EventCreateDT] [datetime] NOT NULL CONSTRAINT [DF_Billing_EventDate]  DEFAULT (getdate()),	[EventTypeID] [int] NOT NULL,	[UserID] [int] NOT NULL,	[ProjectID] [int] NULL,	[PeriodDT1] [datetime] NOT NULL CONSTRAINT [DF_Billing_BeginDate]  DEFAULT (getdate()),	[PeriodDT2] [datetime] NULL,	[PeriodDuration] [int] NULL,	[EventRefreshDT] [datetime] NOT NULL CONSTRAINT [DF_Billing_RefreshDate]  DEFAULT (getdate()),	[iv_RespondentID] [int] NULL,	[iv_RespondentCallID] [int] NULL,	[iv_IsSuccess] [bit] NULL, CONSTRAINT [PK_Billing] PRIMARY KEY CLUSTERED (	[ID] ASC) ON [PRIMARY]) ON [PRIMARY]GOALTER TABLE [dbo].[Billing]  WITH NOCHECK ADD  CONSTRAINT [FK_Billing_BillingEventTypes] FOREIGN KEY([EventTypeID])REFERENCES [dbo].[BillingEventTypes] ([ID])GOALTER TABLE [dbo].[Billing] CHECK CONSTRAINT [FK_Billing_BillingEventTypes]