Is it possible to delete in a while loop like iteration ?
ex:
id value
1 12
1 13 – should delete
1 14 – should delete
2 15.3
2 43 – should delete
2 22 – should delete
Now I need to delete every 2nd and 3rd ( i%2==0 || i%3==0 ) rows.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try with this after taking a backup:
The idea is to insert data that should not be deleted in a temporary table and then delete all data in your_table that are not in that table.