[ mysql ] auto increment 초기화 방법과 데이터에 적용시키는 방법 > database

본문 바로가기
사이트 내 전체검색

database

[ 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 0

댓글목록 0

등록된 댓글이 없습니다.

database 목록

Total 34
게시물 검색

회원로그인

접속자집계

오늘
16,322
어제
35,111
최대
61,067
전체
18,118,610

그누보드5
Copyright © funyphp.com. All rights reserved.