CREATE TABLE [dbo].[ATVariableInstanceNumber] (
    [InstanceID]  INT              NOT NULL,
    [VariableID]  INT              NOT NULL,
    [Value]       NUMERIC (28, 14) NOT NULL,
    [ReferenceID] INT              NULL,
    [Name]        NVARCHAR (50)    NOT NULL,
    [DataType]    INT              NOT NULL,
    CONSTRAINT [PK_ATVariableInstanceNumber] PRIMARY KEY CLUSTERED ([InstanceID] ASC)
);


GO
CREATE NONCLUSTERED INDEX [RefID]
    ON [dbo].[ATVariableInstanceNumber]([ReferenceID] ASC);

