数据库的三种删除方法

1.delete

delete from Student where [条件] 
  • 可以按照条件清除数据
  • 只限于清除数据,表的定义、设置都不会清除

2.truncate

truncate table Student   
  • 清空表内的所有数据,没有条件
  • 相当于将当前表初始化,恢复到刚创建的状态

3.drop

drop table Student
  • 清除关于当前表的所有信息,表不再存在

猜你喜欢

转载自blog.csdn.net/weixin_36494136/article/details/80212412