From: | Duane Lee - EGOVX <DLee(at)mail(dot)maricopa(dot)gov> |
---|---|
To: | "'sathish'" <sathish(at)ceedees(dot)com>, pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: [ADMIN] doubt |
Date: | 2004-06-14 16:48:53 |
Message-ID: | 64EDC403A1417B4299488BAE87CA7CBF01CD0E78@maricopa_xcng0 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Can you make a UNIQUE index on name in the staff_skills table? If not you
may not be able to create the foreign key constraint.
-----Original Message-----
From: sathish [mailto:sathish(at)ceedees(dot)com]
Sent: Friday, June 11, 2004 2:44 AM
To: pgsql-jdbc(at)postgresql(dot)org
Subject: [ADMIN] doubt
dear groups,
i have a doubt in sql,
i have a table staff_skills in which i have set a table level
constraint to create a primary key of two fields .
so 'name' and 'skill' combinedly forms a primary key.
now the issue is in another table i have only 'name' field and i want
to create a foreign key constraint which refers the staff_skills table's
'name' field only.
staff_skills (table) - name,skill,ability (columns) --- primary
key(name,skill)
staff_xxxx (table) - name,x,y,z (columns) --- foreign
key(name) references staff_skills(name).
how to do the above?
your immediate reply will be helpful
yours sincerely
SathishKumar.S
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
From | Date | Subject | |
---|---|---|---|
Next Message | André Gomes | 2004-06-14 18:32:43 | Question about encoding |
Previous Message | Bruno Wolff III | 2004-06-14 15:22:02 | Re: [ADMIN] doubt |