Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sql delete row with auto increment

SET @num := 0;

UPDATE tableName SET id = @num := (@num+1);

ALTER TABLE tableName AUTO_INCREMENT = 1;


<!-- @Zenonymous -->
 
PREVIOUS NEXT
Tagged: #sql #delete #row #auto #increment
ADD COMMENT
Topic
Name
6+2 =