Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 561541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:27:38+00:00 2026-05-13T12:27:38+00:00

I am getting an error when trying to create a relationship within two tables

  • 0

I am getting an error when trying to create a relationship within two tables in Sql Server 2005. I am attempting to create the relationships using the database diagram feature. I have a Player table and a Message table. I want to create two relationships from the Message table to the Player table. I can successfully create the first relationship from Message.From to Player.PlayerId. When I attempt to create the second relationship from Message.To to Player.PlayerId I get an error that says…

‘Player’ table saved successfully
‘Message’ table
– Unable to create relationship ‘FK_Message_Player_To’. The ALTER
TABLE statement conflicted with the
FOREIGN KEY constraint
“FK_Message_Player_To”. The conflict
occurred in database
“TPF”, table
“dbo.Player”, column ‘PlayerId’.

Message
===================
MessageId INT PK,
From INT, -- refers to Player PK
To INT -- also refers to Player PK

Player
=================
PlayerId INT PK,
FirstName NVARCHAR(50),
LastName NVARCHAR(50)

I would like to know what the most optimal way of solving this issue is. Any explanation is greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T12:27:38+00:00Added an answer on May 13, 2026 at 12:27 pm

    This error occurs if you have data in the table that conflicts with the key you are trying to create.

    Either delete the offending data in the “To” field, or change the “Check Existing Data on Creation or Re-enabling” option to “No”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am getting an error while trying to create a database using Server Explorer
I'm using SQL Server 2008. I'm getting an error when I try to create
I am trying to create three tables however I am getting error as You
I am getting strange errors while trying to create a simple database using isql
I am trying to create full text index but I am getting error which
So trying to create a rest service but I keep getting an error: If
I am trying to create a 2 dimensional array but am getting this error.
Trying to create a background-image slideshow and am getting this error... This is the
I'm trying to create a many-to-many relationship using EF code first in my MVC
I am getting error no more tables permitted in this cluster when trying to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.