Skip to content

Instantly share code, notes, and snippets.

@Bhavya8181
Forked from jack2jm/MySQL Queries - Important
Created February 12, 2024 05:53
Show Gist options
  • Save Bhavya8181/dc421ad79021331089a02151acce067c to your computer and use it in GitHub Desktop.
Save Bhavya8181/dc421ad79021331089a02151acce067c to your computer and use it in GitHub Desktop.
// Reset auto increment id
ALTER TABLE tablename AUTO_INCREMENT = 1
// copy new table with indexes (Do not copy data)
CREATE TABLE newtable LIKE oldtable;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment