Self join [message #600] |
Sun, 24 February 2002 19:21  |
Sambit Satpathy
Messages: 1 Registered: February 2002
|
Junior Member |
|
|
Hi,
Do we need to perform a self-join on any table for any purpose,if it has already a primary key defined in it?
Can somebody clarify this with an example please?
|
|
|
|
Re: Self join [message #614 is a reply to message #600] |
Mon, 25 February 2002 00:41  |
pratap kumar tripathy
Messages: 660 Registered: January 2002
|
Senior Member |
|
|
Q:-in your example,what is the primary key?
A:-in my query empno is primary key.
Q:-actually what i neded to ask is do we need to use self join for anything if we've defied primary key in a table?
A:-not necessarily, it depend on your requirement. see my query it returns the employee name and the manager's name of that employee and a both of the information in emp table so we have to perform self join.
Q:-r u from orissa?
A:-yes i am , see www.geocities.com/pktripathy fro details
|
|
|