12.删除数据记录

/*
	delete from table_name
	where condition
	如果省略condition,则删除整个数据表的所有数据记录
*/

-- 删除students表中zy为电子科学技术的数据记录
go
delete from students
where zy='电子科学与技术'

-- 删除所有记录
delete from students

-- 使用truncate table 语句删除数据
--truncate table table_name

-- 利用truncate table语句删除class表中的所有数据记录
truncate table class

猜你喜欢

转载自blog.csdn.net/qq_53183608/article/details/121715697
今日推荐