CREATE TABLE ' Delivery_id_pool ' (' id ' bigint () Not NULL auto_increment COMMENT ' self-increment id ', ' delivery_id ' varchar (Not NULL COMMENT ' waybill number ', ' status ' tinyint (1) DEFAULT ' 1 ' COMMENT ' status [1: Used, 0: not used] ', ' batch_id 'int(one) DEFAULT NULL COMMENT ' batch number ', ' Create_time ' datetime not NULL DEFAULT' 0000-00-00 00:00:00 ' COMMENT ' creation time ', ' update_time ' datetime DEFAULT NULL COMMENT' Update Time ', ' yn ' tinyint (1) DEFAULT ' 1 ' COMMENT ' is valid ', ' ts ' timestamp not NULL DEFAULT current_timestamp on UPDATE current_timestamp COMMENT' Time stamp ', PRIMARY key (' id ', ' create_time '), key ' idx_delivery_id ' (' delivery_id ')) ENGINE=innodb auto_increment=2646421 DEFAULT Charset=utf8 comment= ' waybill number cache pool table-Manually generated waybill number ';
MySQL's Build table statement