id name age
2 Sandy Smith 21
4 Alie Smith 19
5 James Smith 11
Hello, I am new to programming and am watching tutorials online this summer in my free time. I know this is a simple question but I’ve searched online and I can’t find exactly what I need.
I deleted a row so now i no longer have “id 2 3 4 5″. I’m left with 2, 4 ,5”. I don’t know the MySQL query to place alie smith as #3 and james smith as #4. Please help me out with this query. Thanks
If you still have the original insert statements or can re-create them, you can do a
TRUNCATE TABLE [tablenamehere]then reinsert the data. Could be handy if you’re trying to get the table back to a known state.