서버구축,나스구축,서버관리,윈도우서버,리눅스서버,서버관리

Posted
Filed under 프로그래밍/MY-SQL

5.X 버전

select Auto_increment from information_schema.tables where table_schema = '[db_name]' and table_name = '[table_name]'


4.X 버전 이상

show table status from [db_name] like '[table_name]';

 

초기화

데이터가 있을때

alter table [table_name] auto_increment = 1;

없을때.

truncate table [table_name];

2015/02/27 14:09 2015/02/27 14:09