如何在sqlite中重新创建此SQL Server表?

时间:2018-07-24 00:26:54

标签: sqlite

我正在尝试将此表转换为sqlite,似乎无法正确定义。

CREATE TABLE [dbo].[IdentityOneToManyChild]
(
    [ParentId] [int] NOT NULL,
    [ChildId] [int] IDENTITY(1,1) NOT NULL,
    [Text] [nvarchar](50) NOT NULL,

    PRIMARY KEY CLUSTERED ([ParentId] ASC, [ChildId] ASC)
) ON [PRIMARY]

以下对我有用的东西

CREATE TABLE [IdentityOneToOneChild] ( [ParentId] integer NOT NULL, [Text] nvarchar(50) NOT NULL COLLATE NOCASE, PRIMARY KEY ([ParentId]) , FOREIGN KEY ([ParentId]) REFERENCES [IdentityOneToOneParent]([ParentId]) );

0 个答案:

没有答案