How to remove all rows from MySQL database without some specific rows?
How to remove all rows from MySQL database without some specific rows?
Step 1: Go to php myadmin.
Step 2: Select table
Step 3: Select table
Step 4: Go to SQL
Step 5: Paste this query.
1 2 | DELETE FROM your_table_name WHERE id NOT IN (1, 2, 3); |
This code will delete all rows from a table ” your_table_name” but it will not delete row#1, row#2, row#3.
Step 6: Click on Go.