Re: [SQL] Foreign keys and fixed values...

2009-07-30 Thread Daryl Richter
Hi- On Jul 29, 2009, at 4:16 PM, Kjell Rune Skaaraas wrote: Hello, I'm having a problem using foreign keys, or at least in a way i find good. Basicly I have a table I wish to use as a foreign key with lookup "id" and "code", like: 1,a 1,b 1,c 2,a 2,d I have of course an UNIQUE on (id,c

[SQL] Foreign keys and fixed values...

2009-07-29 Thread Kjell Rune Skaaraas
Hello, I'm having a problem using foreign keys, or at least in a way i find good. Basicly I have a table I wish to use as a foreign key with lookup "id" and "code", like: 1,a 1,b 1,c 2,a 2,d I have of course an UNIQUE on (id,code). However, in the table I want the key to apply to, I only hav