[ mysql ] auto increment 초기화 방법과 데이터에 적용시키는 방법
작성자 웹지기
작성일 22-09-22 16:54
조회 8,171
댓글 0
본문
auto increment 초기화
-> ALTER TABLE [테이블명] auto_increment=1;
auto increment 초기화 후 기존 데이터 적용 시키기
-> ALTER TABLE [테이블명] auto_increment=1;
-> SET @count = 0;
-> UPDATE [테이블] SET [auto_increment 컬럼명] = @count:=@count+1;
댓글목록 0
등록된 댓글이 없습니다.
