DROP TABLE IF EXISTS ' Sys_warehouse_area ';
CREATE TABLE ' Sys_warehouse_area ' (
' ID ' bigint (a) Not NULL COMMENT ' warehouse area number ',
' Name ' varchar (not NULL) DEFAULT ' COMMENT ' warehouse zone name ',
' lang_code ' varchar ' not NULL DEFAULT ' COMMENT ' Multi-language code ',
' Status ' bit (1) not NULL DEFAULT B ' 0 ' COMMENT ' state ',
' Type ' int (one) not NULL DEFAULT ' 0 ' COMMENT ' warehouse area type, 1 large parcel area, 2 small parcel area ',
' create_user ' varchar not NULL DEFAULT ' COMMENT ' creator ',
' Create_time ' timestamp not NULL DEFAULT current_timestamp COMMENT ' creation time ',
' Update_user ' varchar () not NULL DEFAULT ' COMMENT ' update person ',
' update_time ' timestamp not NULL the DEFAULT current_timestamp on update current_timestamp COMMENT ' update Time ',
' Delete_status ' bit (1) not NULL DEFAULT B ' 0 ' COMMENT ' is deleted ',
' Delete_user ' varchar () not NULL DEFAULT ' COMMENT ' delete person ',
' Delete_time ' timestamp not NULL DEFAULT current_timestamp COMMENT ' Delete Time ',
' Remarks ' varchar ($) Not NULL DEFAULT ' COMMENT ' remark ',
' pass_no ' varchar (+) not NULL DEFAULT ' COMMENT ' the ' grid number ',
PRIMARY KEY (' id ') USING BTREE
Engine=innodb DEFAULT Charset=utf8 comment= ' warehouse Area table ';
CREATE TABLE ' Testuser ' (
' id ' int (ten) unsigned not NULL auto_increment,
' username ' varchar (+) not NULL DEFAULT ' ',
' Mobile ' int (unsigned) not NULL DEFAULT ' 0 ',
' Shijian ' timestamp not NULL the DEFAULT current_timestamp on UPDATE current_timestamp,
PRIMARY KEY (' id ')
) engine=innodb auto_increment=2 DEFAULT Charset=utf8;
MySQL Build table Good example