IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_task_error]') AND type = 'U')
CREATE TABLE [dbo].[mps_task_error]
(
    [tske_id] int NOT NULL IDENTITY(1, 1),
    [tske_type] varchar(20) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [tske_tskid] bigint NULL DEFAULT((0)),
    [tske_date] datetime NULL DEFAULT(getdate()),
    [tske_number] int NULL DEFAULT((0)),
    [tske_severity] int NULL DEFAULT((0)),
    [tske_state] int NULL DEFAULT((0)),
    [tske_procedure] nvarchar(200) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [tske_line] int NULL DEFAULT((0)),
    [tske_message] nvarchar(max) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    CONSTRAINT [PK_mps_task_error] PRIMARY KEY ([tske_id] ASC)
)