[SOLVED] Delete all records from the table lazarus / 16-Databases ---------------------------------------------------------------------- Pe3s · 2023-07-11 17:30 Hello forum users, I have a question if I wanted to delete all records from a table is it just "DROP TABLE" or can it be done in another way? Regards ---------------------------------------------------------------------- paweld · 2023-07-11 18:08 Code: SQL  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i DELETE FROM Tabeladrop table remove the entire table, not just its contents ---------------------------------------------------------------------- Pe3s · 2023-07-11 19:23 @paweld, thank you ---------------------------------------------------------------------- af0815 · 2023-07-11 19:41 On some systems it gives the command TRUNCATE table , it is nearly the same BUT without a where clause, and can not rollback'ed by a transaction, but is faster. Technical: https://www.geeksforgeeks.org/difference-between-delete- and-truncate/ ---------------------------------------------------------------------- Zvoni · 2023-07-12 07:04 Quote from: paweld on July 11, 2023, 08:08:24 pmCode: SQL  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i DELETE FROM Tabeladrop table remove the entire table, not just its contents A word of advice: I'd be very careful with that. You should be sure BEFORE you fire off that command, that there is no Child-Table with ON DELETE CASCADE, or if there is such a table, that such behavior is expected. Because if there is, you are also nuking any childtables (provided the ON DELETE CASCADE-Clause). Be very careful with your table-designs ---------------------------------------------------------------------- Pe3s · 2023-07-14 16:20 Thank you for valuable advice. Regards