Swp39

Chương 1 - It1

khos SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE TABLE [dbo].[Book](

[bookID] [int] NOT NULL,

[creator] [int] NULL,

[authorName] [nvarchar](max) NULL,

[title] [nvarchar](50) NOT NULL,

[views] [int] NULL,

[detail] [nvarchar](max) NULL,

[image] [nvarchar](max) NULL,

[publishDate] [date] NOT NULL,

[status] [nvarchar](50) NOT NULL,

CONSTRAINT [PK_Book] PRIMARY KEY CLUSTERED

(

[bookID] ASC

)WITH (PADINDEX = OFF, STATISTICSNORECOMPUTE = OFF, IGNOREDUPKEY = OFF, ALLOWROWLOCKS = ON, ALLOWPAGELOCKS = ON, OPTIMIZEFORSEQUENTIAL_KEY = OFF) ON [PRIMARY]

) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

/* Object: Table [dbo].[Category] Script Date: 1/16/2024 9:58:03 AM */

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE TABLE [dbo].[Category](

[CateID] [int] NOT NULL,

[Name] [nvarchar](50) NOT NULL,

CONSTRAINT [PK_Category] PRIMARY KEY CLUSTERED

(

[CateID] ASC

)WITH (PADINDEX = OFF, STATISTICSNORECOMPUTE = OFF, IGNOREDUPKEY = OFF, ALLOWROWLOCKS = ON, ALLOWPAGELOCKS = ON, OPTIMIZEFORSEQUENTIAL_KEY = OFF) ON [PRIMARY]

) ON [PRIMARY]

GO

/* Object: Table [dbo].[Category_in_book] Script Date: 1/16/2024 9:58:03 AM */

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE TABLE [dbo].[Categoryinbook](

[id] [int] NOT NULL,

[BookID] [int] NOT NULL,

[CateID] [int] NOT NULL,

CONSTRAINT [PKCategoryin_book] PRIMARY KEY CLUSTERED

(

[id] ASC

)WITH (PADINDEX = OFF, STATISTICSNORECOMPUTE = OFF, IGNOREDUPKEY = OFF, ALLOWROWLOCKS = ON, ALLOWPAGELOCKS = ON, OPTIMIZEFORSEQUENTIAL_KEY = OFF) ON [PRIMARY]

) ON [PRIMARY]

GO

Bình Luận (0)
Comment