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

  • Home
  • SEARCH
  • 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 8889035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:09:48+00:00 2026-06-14T22:09:48+00:00

I just have a quick question about notation. I have two tables right now.

  • 0

I just have a quick question about notation. I have two tables right now.

This one has basic animal information:

 create table d_animals (
  an_id     integer     primary key
, an_gender varchar2(1) not null
, an_dob    date        not null
, an_name   varchar2(10)    not null
);

This one is about cats:

 create table d_cats (
       an_id                        integer     primary key
     , feline_leukemia_test_date    date        not null
     , an_id    foreign key references d_animals_(an_id)
     );

As you can see, I’m trying to use an_id as the primary key in d_cats but also refernce the an_id from the d_animals table. I’m getting the following error for d_cats:

 ORA-00957: duplicate column name

So how do I correctly write this?

Also, I don’t want to create another column for d_cats. My professor wants us to write d_cats with only an_id and feline_leukemia_test_Date.
Thanks.

  • 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-06-14T22:09:50+00:00Added an answer on June 14, 2026 at 10:09 pm

    Use a named constraint, i.e.:

    create table d_cats (
       an_id                        integer     primary key
     , feline_leukemia_test_date    date        not null
     , constraint d_cats_animals_fk foreign key (an_id) references d_animals (an_id)
     );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A quick question about saving data in symfony 2. I have this method (just
I just have a quick question about how you would typically approach this. I
I just have a quick question about how to get the length of a
This is just a quick question in C#. I have a scenario where I
I just have a quick question about the conditional operator. Still a budding programmer
I just have a quick question about how to generate id's on-the-fly for HTML
I just have a quick question about IE8 Standards mode vs Quirks mode. The
i just have a quick question about concurrent programming in Java. for example, i
I just have a quick question about iterators. I currently want to remove items
I have a quick question about jQuery selectors. Is doing this: $('.class_el_1, .class_el_2').hide(); 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.