Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Primary and foreign keys Expand / Collapse
Author
Message
Posted Friday, October 17, 2008 10:39 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, October 19, 2008 7:27 PM
Points: 4, Visits: 9
Hi,

Just one little question.

Can a primary key be a foreign key too?

thank you
Post #587809
Posted Friday, October 17, 2008 10:45 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Yesterday @ 10:32 PM
Points: 3,110, Visits: 11,529
Yes
Post #587813
Posted Friday, October 17, 2008 10:50 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, October 19, 2008 7:27 PM
Points: 4, Visits: 9
Ok thanks....And in which context ?
Post #587816
Posted Friday, October 17, 2008 10:51 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, November 6, 2014 1:00 PM
Points: 5,333, Visits: 25,277
In short yes. Check out this BOL subject

ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/68ae44ef-990c-49c2-b502-ff1dc41b4019.htm

You can copy column properties from a primary key column to a foreign key column if you want to relate the two columns. Related columns must have the same data type (or data types that can be related) and length.


If everything seems to be going well, you have obviously overlooked something.

Ron

Please help us, help you -before posting a question please read

Before posting a performance problem please read
Post #587817
Posted Friday, October 17, 2008 11:01 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, October 19, 2008 7:27 PM
Points: 4, Visits: 9
mk..... that the only context we can found this situation ?

Thank you
Post #587822
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse