Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Referencing SYS.DBA_USERS ???

Re: Referencing SYS.DBA_USERS ???

From: fumi <fumi__at_tpts5.seed.net.tw>
Date: 25 Feb 1999 11:21:20 GMT
Message-ID: <7b3bng$hta$1@news.seed.net.tw>

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US