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 last 30 days inside the table.
Thanks.
No, TRUNCATE
is all or nothing. You can do a DELETE FROM <table> WHERE <conditions>
but this loses the speed advantages of TRUNCATE
.