代码如下:
/*==============================================================*/
/* 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;