Delete Records MySql Terminal Command

To delete records in mysql use this terminal command.

DELETE FROM [table] WHERE [column] = [value];

Delete all records without dropping the table. This will also reset the increment number value.

DELETE FROM [table];

Delete all records in a table.

truncate table [table];

Remove table columns.

Only cool people share!

ALTER TABLE [table] DROP COLUMN [column];

Deleting tables.

DROP TABLE [table];

Delete a database.

DROP DATABASE [database];

Complete Cheat Sheet https://gist.github.com/hofmannsven/9164408

Delete Records MySql Terminal Command was last modified: March 10th, 2023 by Maximus Mccullough
Delete Records MySql Terminal Command

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.