+1
Beantwoord

deleting all data from sql database

jenifercmartin 11 jaar geleden bijgewerkt door icahill (Administrator) 11 jaar geleden 1
I have a sql database for the user to create and access himself. I know how to allow him to delete lines of data one at a time, but i want to know how to allow him to delete all data at once. Is that possible?
You would just need to alter your query for the SQL table. You could use delete and change your approach to where or you could decide to use truncate which will clear the entire table and only leave the column headers

query="TRUNCATE TABLE table_name"