Home » SQL & PL/SQL » SQL & PL/SQL » ORA-00942
ORA-00942 [message #255411] Tue, 31 July 2007 14:15 Go to next message
caprikar
Messages: 226
Registered: March 2007
Senior Member
Hi,
When I run the following statement am getting ORA-00942 table or view does not exist.

ALTER TABLE VC.OFF_XREF
ADD CONSTRAINT FK_OFF_XREF_MTR
FOREIGN KEY (MASTER_ID)
REFERENCES OROP.PROP_MASTER (
MASTER_ID);

CAN anyone tell me what could be the prob?
I'm able to select from OROP.PROP_MASTER table though.
Thanks,
GK
Re: ORA-00942 [message #255414 is a reply to message #255411] Tue, 31 July 2007 14:31 Go to previous messageGo to next message
Michel Cadot
Messages: 64132
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
To select maybe but not to reference it.

Regards
Michel
Re: ORA-00942 [message #255416 is a reply to message #255414] Tue, 31 July 2007 14:37 Go to previous messageGo to next message
caprikar
Messages: 226
Registered: March 2007
Senior Member
How do I reference the table which is under different schema?
-GK
Re: ORA-00942 [message #255417 is a reply to message #255416] Tue, 31 July 2007 14:51 Go to previous message
Michel Cadot
Messages: 64132
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You first must have the reference privilege on it.

Regards
Michel
Previous Topic: how to get top 3 salaries for each dept
Next Topic: stored procedure(oracle) that can fetch Hierarchical data from a table
Goto Forum:
  


Current Time: Wed Dec 07 22:42:37 CST 2016

Total time taken to generate the page: 0.15293 seconds