命令:show create table 表名

show create table fund_equity

CREATE TABLE `fund_equity` (

 `fundCode` char(10) NOT NULL DEFAULT '' COMMENT '股票代码',

 `fundName` char(50) DEFAULT NULL COMMENT '股票简称',

 `size` char(10) DEFAULT NULL COMMENT '规模风格:0-大盘,1-中盘,2-小盘',

 `investment` char(10) DEFAULT NULL COMMENT '投资风格:0-成长,1-平衡,2-价值',

 `recordDT` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录更新时间',

 PRIMARY KEY (`fundCode`,`recordDT`)

) ENGINE=MyISAM DEFAULT CHARSET=gbk ROW_FORMAT=COMPACT



topic:
CREATE TABLE `topic` (
 `TopicId` int(50) NOT NULL auto_increment,
 `Topic_BoardId` int(10) NOT NULL,
 `Topic_StudentId` int(10) NOT NULL,
 `TopicTitle` varchar(1000) NOT NULL,
 `TopicContent` varchar(6000) NOT NULL,
 `TopicSendTime` varchar(30) NOT NULL,
 PRIMARY KEY  (`TopicId`),
 FOREIGN KEY (`Topic_BoardId`) REFERENCES `board` (`BoardId`) ON DELETE CASCADE ON UPDATE CASCADE,
 FOREIGN KEY (`Topic_StudentId`) REFERENCES `student` (`StudentId`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=gb2312