List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:September 25 1999 5:30pm
Subject:Re: Multiple Primary Keys
View as plain text  
At 12:39 PM -0500 9/25/99, Yuval Malchi wrote:
>Hi,
>
>Ok, so I followed your advice and still getting
>errors.  I have a table called ORDERS(primary key is
>ORDER_ID) and a table called ITEMS (p-key is ITEM_ID).
> I'm using the reference command, but it doesn't seem
>to work.  Comes back with this error:
>
>ERROR: parse error near 'REFERENCES ORDERS,
>ITEM_ID                  CHAR(10) REFERENCES ITEMS
>)' at line 3
>
>
>This is the command I'm issuing:
>
>create table ORDER_ITEMS
>(
>    ORDER_ID                 CHAR(10) REFERENCES
>ORDERS,
>    ITEM_ID                  CHAR(10) REFERENCES ITEMS
>

The statement is accepted by my server (3.23.3).

What version of MySQL do you have?  REFERENCES compatibility
syntax was implemented in 3.21.11.


--
Paul DuBois, paul@stripped
Thread
Multiple Primary KeysYuval Malchi25 Sep
  • Re: Multiple Primary KeysPaul DuBois25 Sep
  • Re: Multiple Primary KeysBob Kline25 Sep
Re: Multiple Primary KeysYuval Malchi25 Sep
  • Re: Multiple Primary KeysPaul DuBois25 Sep
  • Re: Multiple Primary KeysPaul DuBois25 Sep
  • RE: Multiple Primary Keysbkline25 Sep
  • RE: Multiple Primary KeysOtis Gospodnetic25 Sep
    • RE: Multiple Primary KeysBob Kline25 Sep
Re: Multiple Primary KeysYuval Malchi25 Sep
RE: Multiple Primary KeysYuval Malchi25 Sep
  • RE: Multiple Primary KeysBob Kline25 Sep
  • Re: Multiple Primary KeysMartin Ramsch25 Sep