国产成人毛片视频|星空传媒久草视频|欧美激情草久视频|久久久久女女|久操超碰在线播放|亚洲强奸一区二区|五月天丁香社区在线|色婷婷成人丁香网|午夜欧美6666|纯肉无码91视频

sql批量刪除數(shù)據(jù) 怎么批量的刪除數(shù)據(jù)庫(kù)中的表中的數(shù)據(jù)?

怎么批量的刪除數(shù)據(jù)庫(kù)中的表中的數(shù)據(jù)??jī)煞N刪除表內(nèi)容的方法truncate table name;delete from table name where condition;兩種方法的區(qū)別:trunc

怎么批量的刪除數(shù)據(jù)庫(kù)中的表中的數(shù)據(jù)?

兩種刪除表內(nèi)容的方法

truncate table name;

delete from table name where condition;

兩種方法的區(qū)別:

truncate,意思是truncate table,可以刪除所有表而不占用資源。優(yōu)點(diǎn)是速度快,缺點(diǎn)是刪除不能恢復(fù),不能按條件刪除。

刪除,即刪除。此操作占用redlog。它具有恢復(fù)速度快、選擇性刪除等優(yōu)點(diǎn),但缺點(diǎn)是刪除速度慢。不建議批量刪除。