Professional Documents
Culture Documents
Quan Ly Chuyen Bay
Quan Ly Chuyen Bay
======================================
======================================
==
Create Database QLCB
Use QLCB
-----------------------create
table--------------------------------------------
Create table KhachHang
(MaKH nvarchar(10) Primary key, TenKH
nvarchar(30),
DchiKH nvarchar(50), TelKH varchar(10))
----------------------------------------------------------------
---------------------
---------------------------NHẬP NGẮN
GỌN-----------------------------------
---------------------nhập danh sách khách
hàng-----------------------
Select * from KhachHang
Insert into KhachHang values('1', 'Van', 'HaNoi',
'012345')
Insert into KhachHang values('2', 'Hong', 'HaNoi',
'012389')
Insert into KhachHang values('4', 'Thuong',
'NgheAn', '023145')
Insert into KhachHang values('5', 'Bao', 'HaTinh',
'023145')
Insert into KhachHang values('3', 'Toan', 'ThaiBinh',
'04425')
Insert into KhachHang values('7', 'Lieu',
'TuyenQuang', '032584')
Insert into KhachHang values('8', 'Linh', 'NgheAn',
'049842')
Insert into KhachHang values('9', 'John', 'America',
'229045')
Insert into KhachHang values('10', 'Liu Dong',
'China', '54222')
Insert into KhachHang values('11', 'Long',
'HaiPhong', '049822')
Insert into KhachHang values('12', 'Toan', 'HaNam',
'042842')
---view
Create View lienlacKH as
Select MaKH, TenKH, TelKH from KhachHang
Select * from lienlacKH
----------------------------------nhập lịch
bay------------------------------------
Select * from LichBay
Insert into LichBay values('2020-08-21', 'VN-211',
'VN6', 'A320')
Insert into LichBay values('2020-08-22', 'VN-209',
'VN1', 'A321')
Insert into LichBay values('2020-08-20', 'VJ-121',
'VJ5', 'A320 neo')
Insert into LichBay values('2020-08-19', 'BL-783',
'BL3', '43A')
Insert into LichBay values('2020-08-24', 'QH-214',
'QH4', 'M77')
Insert into LichBay values('2020-08-23', 'BL-783',
'BL3', '43A')
Insert into LichBay values('2020-08-16', 'VN-211',
'VN1', 'A321')
Insert into LichBay values('2020-08-29', 'BL-783',
'BL3', '43A')
Insert into LichBay values('2020-08-25', 'VN-209',
'VN1', 'A321')
Insert into LichBay values('2020-08-26', 'QH-214',
'QH4', 'M77')
Insert into LichBay values('2020-08-18', 'VJ-121',
'VJ5', 'A320 neo')
Insert into LichBay values('2020-08-28', 'VN-211',
'VN6', 'A320')
-----------------------------Nhập đặt
chỗ-----------------------------
Insert into DatCho values('1', '2020-08-21', 'VN-211')
Insert into DatCho values('2', '2020-08-19', 'BL-783')
Insert into DatCho values('3', '2020-08-20', 'VJ-121')
Insert into DatCho values('4', '2020-08-22', 'VN-209')
Insert into DatCho values('5', '2020-08-24', 'QH-214')
Insert into DatCho values('6', '2020-08-16', 'VN-211')
Insert into DatCho values('7', '2020-08-26', 'QH-214')
Insert into DatCho values('8', '2020-08-25', 'VN-209')
Insert into DatCho values('9', '2020-08-26', 'QH-214')
Insert into DatCho values('10', '2020-08-18', 'VJ-
121')
Insert into DatCho values('12', '2020-08-16', 'VN-
211')
Insert into DatCho values('11', '2020-08-23', 'BL-
783')
Insert into DatCho values('3', '2020-08-26', 'QH-214')
Select * from DatCho