CREATE TABLE [dbo].[grpcls_classes]
(
[clsc_class_id] [int] NOT NULL,
[clsc_group_code] [dbo].[ais_code_short] NOT NULL,
[clsc_brand_code] [dbo].[ais_code_short] NOT NULL,
[clsc_class_code] [dbo].[ais_code_medium] NOT NULL,
[clsc_vin] [varchar] (50) COLLATE French_CI_AS NULL,
[clsc_vin_order] [smallint] NULL,
[clsc_model] [varchar] (50) COLLATE French_CI_AS NULL,
[clsc_version] [varchar] (50) COLLATE French_CI_AS NULL,
[clsc_fiscal_power] [smallint] NULL,
[clsc_type] [varchar] (5) COLLATE French_CI_AS NULL,
[clsc_intake] [varchar] (5) COLLATE French_CI_AS NULL,
[clsc_value] [dbo].[ais_decimal2] NULL,
[clsc_energy] [varchar] (5) COLLATE French_CI_AS NULL,
[clsc_cc] [smallint] NULL,
[clsc_gender] [varchar] (5) COLLATE French_CI_AS NULL,
[clsc_default_group] [varchar] (3) COLLATE French_CI_AS NULL,
[clsc_default_class] [varchar] (3) COLLATE French_CI_AS NULL,
[clsc_default_theft] [varchar] (3) COLLATE French_CI_AS NULL,
[clsc_sra_group] [varchar] (2) COLLATE French_CI_AS NULL,
[clsc_sra_class] [varchar] (2) COLLATE French_CI_AS NULL,
[clsc_sra_repair] [varchar] (2) COLLATE French_CI_AS NULL
) ON [PRIMARY]
ALTER TABLE [dbo].[grpcls_classes] ADD 
CONSTRAINT [PK_grpcls_classes] PRIMARY KEY CLUSTERED  ([clsc_class_id]) ON [PRIMARY]
CREATE UNIQUE NONCLUSTERED INDEX [IX_grpcls_classes] ON [dbo].[grpcls_classes] ([clsc_group_code], [clsc_brand_code], [clsc_class_code]) ON [PRIMARY]

GO

ALTER TABLE [dbo].[grpcls_classes] ADD CONSTRAINT [FK_grpcls_classes_grpcls_brands1] FOREIGN KEY ([clsc_group_code], [clsc_brand_code]) REFERENCES [dbo].[grpcls_brands] ([clsb_group_code], [clsb_brand_code])
GO
