USE [df2] GO /****** Object: Table [dbo].[Billing] Script Date: 12/12/2007 09:25:55 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE 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] GO ALTER TABLE [dbo].[Billing] WITH NOCHECK ADD CONSTRAINT [FK_Billing_BillingEventTypes] FOREIGN KEY([EventTypeID]) REFERENCES [dbo].[BillingEventTypes] ([ID]) GO ALTER TABLE [dbo].[Billing] CHECK CONSTRAINT [FK_Billing_BillingEventTypes]