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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T15:35:20+00:00 2026-05-16T15:35:20+00:00

hi all i want to know that while we create a forigen key for

  • 0

hi all i want to know that while we create a forigen key for any table then why we use constraints like..

CREATE TABLE Persons
(
    PersonID int identity(1,1) NOT NULL,
    FirstName nvarchar(20),
    LastName nvarchar(20) NOT NULL,
    CONSTRAINT PrimKeyPeople PRIMARY KEY(PersonID)
);

here all ready PersonID is primary key then why it’s need to give another name primkeypeople.
why we use constraints name here PrimKeyPeople here what is PrimKeyPeople ?

  • 1 1 Answer
  • 1 View
  • 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-16T15:35:21+00:00Added an answer on May 16, 2026 at 3:35 pm

    Constraint can be described as rule you must follow.

    Several constraints known in DBMS are Primary Key, Foreign Key and Unique. Primary Key and Unique ensures that all value in it is unique. Hence any non-unique value will never be accepted.

    Other constraint like foreign key ensures that its value refers to another value in another table. Hence any foreign key value which doesn’t refer to another value will never be accepted.

    In your case, PrimKeyPeople is a primary key in table Persons. This primary key (unique constraint) will assert that every value in it will be unique. Naming a constraint is a must (for DBMS) but optional for users. This ‘naming’ is required because sometime we need to disable/enable/remove some constraints. To make it user-friendly, some DBMS provides default name to every constraints so that user doesn’t have to declare it explicitly.

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

Sidebar

Related Questions

hi all i want to know that while specifying url in my iphone native
hi all i want to know that we can store information and session information
hello i am little new to all this but i want to know that:
This is a homework assignment, just for all that want to know. I'm writing
All I want to know is if there's an easy way to add lines
I want to know when all of the events for a mouse event have
I want to know the list of all countries and the encryption standard not
I want to know if the code below removes all input type='text' values back
I want to know, can I enumerate all hardwares or unknown hardwares using a
I just want to know a easy way to extract all data with same

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.