首先创建表:CREATE TABLE sys_sequence ( NAME varchar(50) NOT NULL, CURRENT_VALUE int(11) NOT NULL DEFAULT '0', INCREMENT int(11) NOT NULL DEFAULT '1', PRIMARY KEY (NAME) ) 插入记录:INSERT INTO SYS_SEQUENCE(NAME,CURRENT_VALUE,INCREMENT) VALUES('TBL_FS', 1,1) 执行函数:DELIMITER $$