auto_increment 값 1000부터 테이블 생성

create table 테이블 (
num int(11) unsigned not null auto_increment primary key
) type=myisam auto_increment=1000;

auto_increment 값 변경

alter table 테이블명 auto_increment=1000;


현재 auto_increment 값 알기

$SQL = "SHOW TABLE STATUS LIKE 'TableName'";


mysql> show table status like "tableName" G
*************************** 1. row ***************************
Name: tablename
Type: MyISAM
Row_format: Dynamic
Rows: 30154
Avg_row_length: 330
Data_length: 9962860
Max_data_length: 4294967295
Index_length: 1963008
Data_free: 0
Auto_increment: 104136
Create_time: 2005-05-31 11:57:59
Update_time: 2006-02-06 22:10:02
Check_time: NULL
Create_options:
Comment:
1 row in set (0.00 sec)

'시스템, 서버 > 데이타베이스' 카테고리의 다른 글

ERROR 1449 (HY000): There is no 'root'@'%' registered  (1) 2009.02.03
IFNULL  (0) 2007.11.22
문자 합치기  (0) 2007.11.15
시퀀스 - cache  (0) 2007.04.27
SQL_CALC_FOUND_ROWS  (0) 2007.01.24
블로그 이미지

용병

,