0% found this document useful (0 votes)
15 views3 pages

Ngon Ngu SQL

Uploaded by

tokanuyeto
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)
15 views3 pages

Ngon Ngu SQL

Uploaded by

tokanuyeto
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/ 3

1.

create table Monhoc(mamh text(10) primary key, tenmh text(30), sotc number)
2. create table Sinhvien(masv text(10) primary key, hoten text(20), ngaysinh datetime, phai yesno)
3. create table Thi(masv text(10) references Sinhvien(masv), mamh text(10) references
monhoc(mamh), ngaythi datetime, diem integer, primary key(masv, mamh))
4. alter table Thi add column ketqua text
5. alter table Sinhvien add column quequan text(30)
6. alter table Thi drop column ketqua
7. drop table Thi
8. insert into Monhoc values (“is301”, “Co so du lieu”, 3)
9. insert into Sinhvien values (“sv01”, “Ngo Kim Hoang Nam”, #06/08/2004#, No)
10. insert into Thi values (“sv01”, “is301”, #02/10/2023#, 7)
11. update Sinhvien set quequan = “Da Nang” where masv = “sv01”
12. update Thi set diem = diem + 2 where masv = “sv01” and mamh = “is301”
13. delete from Thi where diem <= 4
14. delete from Sinhvien where phai yes

You might also like