实例讲解MySQL数据库中应如何建立外键.docVIP

  • 4
  • 0
  • 约 9页
  • 2017-02-28 发布于湖北
  • 举报

实例讲解MySQL数据库中应如何建立外键.doc

实例讲解MySQL数据库中应如何建立外键 [摘要] 在MySQL数据库中建立外键示例,包含主表,表cotton 等。 [关键字] MySQL 实例讲解 建立外键   在MySQL数据库中建立外键:   示例:   1.主表   DROP TABLE IF EXISTS `biao`;   CREATE TABLE `biao` (   id` int(11) NOT NULL auto_increment,   title` varchar(11) default NULL,   content` varchar(11) default NULL,   PRIMARY KEY (`id`)   ) ENGINE=InnoDB DEFAULT CHARSET=gb2312;   2.表cotton   关系是1:N 。   drop table cotton;   create table cotton(    id int primary key,    user varchar(11),    email varchar(11),    url varchar(11),    content varchar(11),    addTime date,    biao_id int,    con

文档评论(0)

1亿VIP精品文档

相关文档