Truncate all tables in mysql using one comment
SELECT CONCAT('truncate table ',table_name,';')
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = 'table_name'
AND TABLE_TYPE = 'BASE TABLE';
Execute the above comment it shows the truncate comment like below
truncate table table2;
truncate table table3;
truncate table table4;
truncate table table5;
Copy the Comment & paste to the SQL editor and run the comment....
No comments:
Post a Comment