命令:show create table 表名
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
阅读(45791) | 评论(0) | 转发(1) |