SQL (Structured Query Language) (tiếp theo)
Xoá dữ liệu
Dùng câu lệnh “delete from…” để xoá các dữ liệu thoả mãn một điều kiện mong muốn
Cú pháp:
delete from tên-quan-hệ
[where điều-kiện];
Mệnh đề where tương tự trong câu lệnh select
VD:
delete from Student where regdate '2000-01-01';
delete from Book where
Xoá toàn bộ dữ liệu của quan hệ:
delete from quan-hệ;
truncate quan-hệ;