0% found this document useful (0 votes)
24 views1 page

CREATE DATABASE EClassyShop

Uploaded by

ngochoanss1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views1 page

CREATE DATABASE EClassyShop

Uploaded by

ngochoanss1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

CREATE DATABASE EClassyShop;

USE EClassyShop;

CREATE TABLE Category (


Id int primary key identity,
CatName nvarchar(50))
GO

CREATE TABLE Product (


ProId int Primary Key Identity(1,1),
ProName nvarchar(100),
ProImage nvarchar(100),
ProPrice decimal(18),
Discount int,
CatId int )
GO

CREATE TABLE [User] (


UserId int primary key identity(1,1),
UserName varchar(50),
UserPassword varchar(255),
UserConfirmPassword varchar(255),
UserEmail varchar(50))
GO

CREATE TABLE OrderDetail (


OrderId int,
ProductId int,
ProName nvarchar(100),
Quatity int,
Price float,
TotalMoney int,
Primary key(OrderId, ProductId),
Foreign key(ProductId) references Product(ProId))
GO

Insert into Category values(N'Trang chủ')


Insert into Category values(N'Về')
Insert into Category values(N'Thời trang nam')
Insert into Category values(N'Thời trang nữ')
Insert into Category values(N'Áo khoác')
Insert into Category values(N'Liên hệ')
GO

You might also like