Can I create primary key, foreign key cross schema?
How can I reference columns of a table in different schema?
Is there a GRANT that allow user to reference any columns in any table in any schema if granted?
Thanks,
Mohammad Zahid
Software Engineer
Vancouver, Canada.
e-mail : mzahid@shaw.ca
Pls read the following example
------------------------------
To grant to user SCOTT the REFERENCES privilege on the employee_id column and the UPDATE privilege on the employee_id, salary, and commission_pct columns of the employees table in the schema hr, issue the following statement:
GRANT REFERENCES (employee_id),
UPDATE (employee_id, salary, commission_pct)
ON hr.employees
TO SCOTT;
SCOTT can subsequently update values of the employee_id, salary, and commission_pct columns. SCOTT can also define referential integrity constraints that refer to the employee_id column. However, because the GRANT statement lists only these columns, SCOTT cannot perform operations on any of the other columns of the employees table.
For example, SCOTT can create a table with a constraint:
No, it does not. I granted the privileges suggested in the previous update and did not work. I still cannot build reference link to table in another schema without granting privileges at the object level.
I am looking for a way to grant privileges at schema level to be able to build reference to column in any schema in the database.
Thanks again!
- Mohammad Zahid
Software Engineer.
Vancouver, Canada.
Originally posted by mzahid I am looking for a way to grant privileges at schema level to be able to build reference to column in any schema in the database.
Can't do it -- you have to specify the grant at the object level.
Bookmarks