Link to home
Start Free TrialLog in
Avatar of OMDBot
OMDBot

asked on

Delete all rows in SQL except 4?

Hi,

I am using phpMyAdmin and would like to delete all rows in a 5000+ row table with the exception of the top four rows (ID 1 2 3 and 4)

Is there any simple SQL code which can delete all rows except the ID's specified?
ASKER CERTIFIED SOLUTION
Avatar of Kent Olsen
Kent Olsen
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of OMDBot
OMDBot

ASKER

Perfect! Thanks!