Thread: Koreign Key
View Single Post

   
  #1 (permalink)  
Old 02-28-2008, 11:21 AM
gabryfan
 
Posts: n/a
Default Koreign Key

hi

I can make an tree using reference (foreing) key on self table?

example

command SQL:
create table a (
ID INT not null auto_increment,
n varchar(100),
x int,
primary key ID,
Constraint n forign_key (x) references a(ID) on delete cascade on update
cascade
)
egine InnoDB.

This Instraction can be running on mysql 5.0

thank's
gabry

webmaster di www.fantogame.it


buongiorno

Io posso creare un albero usando reference (foreing) key sulla stessa
tabella:

instruzione SQL:



create table a (
ID INT not null auto_increment,
x varchar(100),
x int,
primary key ID,
Constraint n forign_key (x) references a(x) on delete cascade on update
cascade
)

egine InnoDB.


puņ funzionare su mysql 5.0 ocrea qualche intoppo.

grazie gabry

webmaster di
www.fantogame.it
Reply With Quote