CREATE TABLE [dbo].[appointments] ( [id] [int] NOT NULL, [subsidiary] [int] NULL, [appointment_type] [int] NULL, [customer_number] [int] NULL, [vehicle_number] [int] NULL, [comment] [varchar](255) NULL, [created_by_employee] [int] NULL, [created_timestamp] [datetime] NULL, [locked_by_employee] [int] NULL, [blocked_timestamp] [datetime] NULL, [bring_timestamp] [datetime] NULL, [return_timestamp] [datetime] NULL, [pseudo_customer_name] [varchar](255) NULL, [pseudo_customer_country] [varchar](10) NULL, [pseudo_customer_zip_code] [varchar](100) NULL, [pseudo_customer_home_city] [varchar](100) NULL, [pseudo_customer_home_street] [varchar](100) NULL, [pseudo_vehicle_make_number] [int] NULL, [pseudo_vehicle_make_text] [varchar](50) NULL, [pseudo_model_code] [varchar](50) NULL, [pseudo_model_text] [varchar](50) NULL, [order_number] [int] NULL, [is_customer_reminder_allowed] [smallint] NULL, [customer_reminder_type] [varchar](100) NULL, [customer_reminder_timestamp] [datetime] NULL, [bring_duration] [int] NULL, [bring_employee_no] [int] NULL, [return_duration] [int] NULL, [return_employee_no] [int] NULL, [customer_pickup_bring] [int] NULL, [is_general_inspection_service] [smallint] NULL, [urgency] [int] NULL, [vehicle_status] [int] NULL, [progress_status] [int] NULL, [lock_by_workstation] [int] NULL, [lock_time] [datetime] NULL, [lock_trace] [varchar](255) NULL, [lock_trigger] [varchar](255) NULL, [lock_by_employee] [int] NULL, [lock_sourcecode] [varchar](255) NULL, [client_db] [varchar](20) NOT NULL ,CONSTRAINT [appointments$0] PRIMARY KEY CLUSTERED ([id], [client_db]) ) GO