Why in the world would you want to do this? Think about it, you have similar
data in two different columns that should be in one. If a value in (c) is
the same as (b) which enables it to have a FK link to (a) then why not merge
the columns and save yourself some headaches?

-----Original Message-----
From: Sven K�hler [mailto:[EMAIL PROTECTED]
Sent: Saturday, July 24, 2004 8:45 AM
To: [EMAIL PROTECTED]
Subject: [BUG] general error; -7040


CREATE TABLE test1(a int default serial, primary key(a))
//
CREATE TABLE test2(a int default serial, b int, c int,
primary key(a),
foreign key b(b) references test1(a) on delete set null,
foreign key c(c) references test1(a) on delete set null)

I don't see, why those statement should be rejected with

General error;-7040 POS(1) Referential constraint not allowed.
CREATE TABLE test2(a int default serial, b int, c int,
primary key(a),
foreign key b(b) references test1(a) on delete set null,
foreign key c(c) references test1(a) on delete set null)

Multiple referencial constraints to one table should be allowed!



-- 
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to