The document describes steps to create a database and tables in SQL Server. It creates a database called "BaoChi" and specifies properties like size and growth. It then creates 8 tables to store information about branches, products, publishing houses, customers, subscription orders, topics, and employees. Primary keys are added to each table to uniquely identify records.
The document describes steps to create a database and tables in SQL Server. It creates a database called "BaoChi" and specifies properties like size and growth. It then creates 8 tables to store information about branches, products, publishing houses, customers, subscription orders, topics, and employees. Primary keys are added to each table to uniquely identify records.
The document describes steps to create a database and tables in SQL Server. It creates a database called "BaoChi" and specifies properties like size and growth. It then creates 8 tables to store information about branches, products, publishing houses, customers, subscription orders, topics, and employees. Primary keys are added to each table to uniquely identify records.
( MaToaSoan char(100) Not Null , TenToaSoan nvarchar(100) Not Null , DiaChi nvarchar(100) Not Null , SDT int Not Null , )
Create Table KhachHang
( IDKhachHang char(100) Not Null , Ho nvarchar(100), Ten nvarchar(100) Not Null , CoQuan varchar(100) Not Null , DiaChi nvarchar(100) Not Null , SDT char Not Null , Email varchar )
Create Table PhieuDatBao
( SoPhieu char(100) Not Null , Ngaylap date Not Null , ThoiHanDangKi date Not Null , TenCNnhanbao nvarchar(100) Not Null , TenKhachHang nvarchar(100) Not Null , DiaChiKhachHang nvarchar Not Null , TenAnPham nvarchar(100) Not Null , SoLuongAnPham int Not Null , DonGiaAnPham float Not Null , )
Create Table ChuDe
( MaChuDe char(100), TenChuDe nvarchar(100) )
Create Table NhanVien
( MaNV char(100) Not Null , HoTenNv nvarchar(100) Not Null , ) Khóa Chính Alter Table ChiNhanh Add Constraint cn_pk Primary key (MaCN) Go