Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Create Foreign key Constraint against another schema

MaahjoorMay 20 2013 — edited May 20 2013
Dear all,

i am using oracle 10g r2 database in windows 2003 server.

i have a table in HRMS as STAFF.
I have another schema INVENTORY, where i want to access a column as a foreign key from HRMS.STAFF(STAFF_ID).
connect hrms/hrms@orcl
grant select on STAFF to INVENTORY;
connect inventory/inventory@orcl
alter table inv_details add constraint fk_inv_hr_staff foreign key (staff_id) references HRMS.STAFF(STAFF_ID);
Error report:
SQL Error: ORA-00942: table or view does not exist
00942. 00000 -  "table or view does not exist"
what exactly i need to grant so that INVENTORY schema will be able to create referential constraint?

Regards.
This post has been answered by Hemant K Chitale on May 20 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 17 2013
Added on May 20 2013
6 comments
1,973 views