Click to See Complete Forum and Search --> : Tables Relationship


hussein2000
April 30th, 2007, 02:53 AM
Hi All

I have to Schemas IN One database and each Schemas have many tables

so some table in Schemas A need to be related to tables in Schemas B.

FOR EX :

Emp table in Schemas A i want to relat it to Dept table in Schemas B

SO

When i pass this create query it gives an error

my query is

create table emp(empno number constraint emp_bk primary key,empname varchar2(50), deptno number constraint dept_fk references B.Dept(Deptno))


B is A Schemas which contain Dept table .

please help.
thanks

davide++
April 30th, 2007, 03:28 AM
Hi all.

What database are you using?
What error do you get?
Please say these informations, otherwise is hard for us help you.

Maybe schema A haven't the necessary privileges on Dept table of schema B.

hussein2000
May 1st, 2007, 09:15 AM
thanks all

yes i am using oracle8i

and what i want is

when i have two Schemas A and B and i want to create two table emp
in Schema A and dept in Schema B and these tables emp and dept should be related so how to creat these table relted by deptno .

thanks