Home » SQL & PL/SQL » SQL & PL/SQL » About primary keys
About primary keys [message #11139] Tue, 09 March 2004 03:04 Go to next message
K.B.Shesha Saai
Messages: 14
Registered: February 2004
Junior Member
Can anyone suggest me the answer for this

In oracle 7.x or 8

I have a table with a composite primary key (2 cols as primary key, created at the table level)

for example

dept --- table name

deptno        --- primary key

dname         --- primary key

loc

NOw i want to create another table (for example emp), in which one of columns should refer to only ONE COLUMN of the composite primary key of the dept table.  Can i ?  If no, WHY ???

Seshu
Re: About primary keys [message #11152 is a reply to message #11139] Tue, 09 March 2004 12:43 Go to previous message
William Robertson
Messages: 1643
Registered: August 2003
Location: London, UK
Senior Member
If deptno is not unique within dept, then where IS it actually defined? That will be the table emp needs to refer to.
Previous Topic: ORA-01858
Next Topic: SQL with Visual Basic 06
Goto Forum:
  


Current Time: Thu Apr 25 11:14:21 CDT 2024