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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:37:46+00:00 2026-05-25T14:37:46+00:00

Assume that a table have 4 columns A, B, C and D. Only A

  • 0

Assume that a table have 4 columns A, B, C and D. Only A column defines uniqueness that’s why it’s a primary key. B, C and D allow entries to repeat that’s why we can’t take them as an composite alternate key. Is it possible to use the same column in primary key and alternate key, say, to make a alternate key as (A and B)?

  • 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-25T14:37:47+00:00Added an answer on May 25, 2026 at 2:37 pm

    Unless I didn’t get your idea, for MS SQL it’s quite possible, look at this test:

    CREATE TABLE Alternate (
        A int IDENTITY(1,1) NOT NULL,
        B int NULL,
        C int NULL,
        D int NULL,
     CONSTRAINT PK_Alternate PRIMARY KEY (A),
     CONSTRAINT AK_Alternate Unique (A,B)
    )
    GO
    
    insert into Alternate (B) values(1)
    insert into Alternate (B) values(1)
    insert into Alternate (B) values(1)
    insert into Alternate (B) values(null)
    insert into Alternate (B) values(null)
    insert into Alternate (B) values(null)
    
    select A, B from Alternate
    

    The result is as following:

    1 1

    2 1

    3 1

    4 NULL

    5 NULL

    6 NULL

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

Sidebar

Related Questions

Imagine I have a table with two columns, a primary key and some data.
Assume a table that uses a natural key and has a number of existing
I have a few columns in a table that are added to my publication
Consider the following Dig, Assume that all the three tables have a column Is_Deleted
Assume I've got the table: CREATE TABLE test ( ID INT AUTO_INCREMENT PRIMARY KEY,
Here is a simple example: Assume I have a customer table that has a
To illustrate, assume that I have two tables as follows: VehicleID Name 1 Chuck
Assume that we have N erlang nodes, running same application. I want to share
Assume that you have a running SQL Server Express instance named (local)\SQLEXPRESS. Its database
Assume that I have this piece of code: @interface Foo : NSObject { Bar

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.