mysql数据库测试

CREATE TABLE `TB_BOOK` (
  `BOOK_ID` INTEGER(11) NOT NULL AUTO_INCREMENT,
  `TYPE_ID` INTEGER(11) NOT NULL ,
  `BOOK_TITLE` VARCHAR(50) COLLATE UTF8_GENERAL_CI DEFAULT NULL,
  `BOOK_AUTHOR` VARCHAR(20) COLLATE UTF8_GENERAL_CI DEFAULT NULL,
  `BOOK_TOTAL` INTEGER(11) DEFAULT NULL,
  `BOOK_PRICE` FLOAT DEFAULT NULL,
  `BOOK_ISBN` VARCHAR(20) COLLATE UTF8_GENERAL_CI DEFAULT NULL,
  `BOOK_PUBLISHER` VARCHAR(50) COLLATE UTF8_GENERAL_CI DEFAULT NULL,
  PRIMARY KEY (`BOOK_ID`)
)ENGINE=INNODB
AUTO_INCREMENT=22 CHARACTER SET 'utf8' COLLATE 'utf8_general_ci'
COMMENT='InnoDB free: 11264 kB';

CREATE TABLE `TB_BOOK_TYPE` (
  `TYPE_ID` INTEGER(11) NOT NULL AUTO_INCREMENT,  
  `TYPE_NAME` VARCHAR(50) COLLATE UTF8_GENERAL_CI DEFAULT NULL,
  `TYPE_DESC` VARCHAR(50) COLLATE UTF8_GENERAL_CI DEFAULT NULL,
  `CREATE_DATE` DATE DEFAULT NULL,
  `CREATE_BY`  VARCHAR(50) DEFAULT NULL,  
  PRIMARY KEY (`TYPE_ID`)
)ENGINE=INNODB
AUTO_INCREMENT=22 CHARACTER SET 'utf8' COLLATE 'utf8_general_ci'
COMMENT='InnoDB free: 11264 kB';

 

你可能感兴趣的:(mysql)