赞
踩
//创建一个comments表
CREATE TABLE `comments` (
`cid` int NOT NULL AUTO_INCREMENT,
`cnid` int NOT NULL,
`ccontent` varchar(3000) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`cdate` datetime NOT NULL,
`cip` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`cauthor` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`cid`) USING BTREE,
INDEX `CIN_NID`(`cnid`) USING BTREE,
CONSTRAINT `CIN_NID` FOREIGN KEY (`cnid`) REFERENCES `news` (`nid`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 49 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;
这样就很快的用SQL生成了java实体类了。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。