Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: SQL Help
>
> ACCESSLEVEL(ACCESSID) ON DELETE CASCADE)
>
> *
> ERROR at line 5:
> ORA-02270: no matching unique or primary key for this column-list
> /**********************************************************************/
>
> I am able to create accesslevel, which has a composite key comprising
> accessid and transcationid, but i do not know why labuser is not able to
> have relation with accessid.
The reason that you are having a problem is due to the fact that there is no unique or primary key for just the ACCESSID column. Your primary key is a composite key. If you want to use the primary key in a FK relationship, you need to use the entire primary key, not just one part of it. Try creating a unique key on ACCESSID in the ACCESSLEVEL table and the FK should work just fine.
HTH,
Brian
-- ======================================== Brian Peasland Raytheons Systems at USGS EROS Data Center These opinions are my own and do not necessarily reflect the opinions of my company! ========================================Received on Thu Jun 22 2000 - 00:00:00 CDT
![]() |
![]() |