[ programming ] 想使有数据操作过的表的auto_increment字段从1开始?
Author: iwind @ 2003-12-18 18 Weather:晴 Comments( 0 )
(1)
[color=blue]alter table tbl_name auto_increment=0; [/color]
(2)
[color=blue]TRUNCATE TABLE tbl_name ;[/color]
第一种是修改字段属性,第二种则是清空数据表(表不为空的情况下,第一种方法也是无效的);同时,第一种方法会占浪费一些空间。
Author: iwind @ 2003-12-18 18 Weather:晴 Comments( 0 )
(1)
[color=blue]alter table tbl_name auto_increment=0; [/color]
(2)
[color=blue]TRUNCATE TABLE tbl_name ;[/color]
第一种是修改字段属性,第二种则是清空数据表(表不为空的情况下,第一种方法也是无效的);同时,第一种方法会占浪费一些空间。