Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Referencing SYS.DBA_USERS ???
news.logica.com ¼¶¼g©ó¤å³¹ <7au6ud$i4c_at_romeo.logica.co.uk>...
>Hi,
>The following script
>create table test_user_ref (name varchar2(30),
> userid_ref number,
> constraint fk_userid
> foreign key (userid_ref)
> references SYS.DBA_USERS
(USER_ID));
>results in:
>ERROR at line 5:
>ORA-02444: Cannot resolve referenced object in referential constraints
>Does anybody have a workaround for this problem?
Since DBA_USERS is a view, REFERENCES is not allowed for views. You should use the underlay table SYS.USER$. Change the last line as following:
references SYS.USER$ (USER#) Received on Thu Feb 25 1999 - 05:21:20 CST