Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
T-SQL (SS2K5)
»
Primary and foreign keys
Primary and foreign keys
Rate Topic
Display Mode
Topic Options
Author
Message
Bill-870541
Bill-870541
Posted Friday, October 17, 2008 10:39 AM
Forum 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
Michael Valentine Jones
Michael Valentine Jones
Posted Friday, October 17, 2008 10:45 AM
SSCrazy
Group: General Forum Members
Last Login: 2 days ago @ 3:14 PM
Points: 2,941,
Visits: 10,481
Yes
Post #587813
Bill-870541
Bill-870541
Posted Friday, October 17, 2008 10:50 AM
Forum 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
bitbucket-25253
bitbucket-25253
Posted Friday, October 17, 2008 10:51 AM
SSCertifiable
Group: General Forum Members
Last Login: Yesterday @ 9:21 AM
Points: 5,099,
Visits: 20,191
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
Bill-870541
Bill-870541
Posted Friday, October 17, 2008 11:01 AM
Forum 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 »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.