Truncate with condition

前端 未结 4 1610
野的像风
野的像风 2020-12-08 09:49

truncate ->this resets the entire table, is there a way via truncate to reset particular records/check conditions.

For ex: i want to reset all the data and keep las

4条回答
  •  [愿得一人]
    2020-12-08 10:26

    No, TRUNCATE is all or nothing. You can do a DELETE FROM

    WHERE but this loses the speed advantages of TRUNCATE.

    提交回复
    热议问题