创建约束后,插入数据失败?该怎么解决

创建约束后,插入数据失败?该怎么解决

创建约束后,插入数据失败?

代码如下:

/*==============================================================*/

/*   DBMS   name:             MySQL   5.0                                                                         */

/*   Created   on:           2007-4-4   11:31:49                                                         */

/*==============================================================*/

drop   table   if   exists   acti_newclass;

/*==============================================================*/

/*   Table:   acti_newclass                                                                                   */

/*==============================================================*/

create   table   acti_newclass

(

      id                                       int   not   null   auto_increment,

      act_id                               int,

      title                                 varchar(50),

      num                                     int,

      primary   key   (id)

);

alter   table   acti_newclass   add   constraint   FK_Reference_1   foreign   key   (act_id)

            references   acti_newclass   (id)   on   delete   cascade;



插入数据时有什么报错??




你的插入语句给两个出来看看。

创建约束后,插入数据失败?该怎么解决

相关文章:

你感兴趣的文章:

标签云: