CREATE TABLE [dbo].[ATSearchCriterion] (
    [SearchId]   INT           NOT NULL,
    [FieldName]  NVARCHAR (50) NOT NULL,
    [FieldValue] NVARCHAR (50) NOT NULL,
    [FieldType]  INT           NOT NULL,
    [DataType]   INT           NOT NULL,
    [Compare]    INT           NOT NULL,
    [NestLevel]  INT           NOT NULL,
    [JoinType]   INT           NOT NULL,
    [ItemIndex]  INT           NOT NULL
);


GO
CREATE NONCLUSTERED INDEX [ATSearchCriterion_SearchId]
    ON [dbo].[ATSearchCriterion]([SearchId] ASC);

