delete everything from table mysql code example
Example 1: delete all rows from table mysql
TRUNCATE TABLE my_table;
DELETE FROM my_table;
COMMIT;
Example 2: delete all records from table
DELETE FROM table_name;
Example 3: remove all records from table mysql
DELETE from tableName;
TRUNCATE tableName;
Example 4: mysql delete entire row on condition
DELETE FROM table_name [WHERE Clause]
Example 5: delete all content in table mysql
TRUNCATE tablename
Example 6: stored procedure to delete data from table in mysql
mysql> DELIMITER
mysql> Create Procedure Delete_studentinfo ( IN p_id INT)
-> BEGIN
-> DELETE FROM student_info
-> WHERE ID=p_id;
-> END
Query OK, 0 rows affected (0.11 sec)
mysql> DELIMITER ;