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 989825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:51:15+00:00 2026-05-16T05:51:15+00:00

I have two tables: players (has a team name column) and teams (also has

  • 0

I have two tables:

players (has a team name column) and teams (also has a team name column)

I want to only allow inserts of new players if the team name exists in the team table.

Any help would be appreciated. Please keep it simple because I’m still learning.

  • 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-16T05:51:15+00:00Added an answer on May 16, 2026 at 5:51 am

    Then supposedly you should make the TeamName column in the Teams table a Primary Key and the TeamName column in the Players table a Foreign Key, pointing to the one in the TeamName column of the Teams table.

    Notice though that using “TeamName” as the indentifier of the team is not such a good idea – it would be a better idea to have a Team_ID columns which is just some arbitrary number, so that if the team name changes, you won’t have to change it in all the rows in the Players field that point to it.

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

Sidebar

Related Questions

I have two tables: Table1: id attr1 fk1(Table2) fk2(Table2) Table2: id name I want
I have two tables players and scores . I want to generate a report
I have two sql tables Players and Teams joined by a PlayerTeam junction table.
I have two database tables, Team ( ID, NAME, CITY, BOSS, TOTALPLAYER ) and
I have two tables Players table (object) ------------- PlayerID Name Birthday List<Matches> Matches and
I have two tables in the database Team:Id(int PK), Name(nvarchar) and Player:Id(int PK), Name(nvarchar),
I have two tables USER and TRANSACTION i want to choose the data from
I have two tables named MEMBER - columns id(primary key), name, email & TOPICS
I have two tables, TABLE_1 and TABLE_2 . TABLE_1 contains ID and NAME ,
I have two tables with city names in them. I want to check the

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.