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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:42:47+00:00 2026-05-26T19:42:47+00:00

Unable to create table as oracle shows ‘ no matching unique or primary key

  • 0

Unable to create table as oracle shows ‘ no matching unique or primary key for this column-list’ when I did label the primary key reference for the required table.

First table created successfully:

CREATE TABLE TEST
  (
    TESTno VARCHAR2(6) NOT NULL,
    ExamNo VARCHAR2(6) NOT NULL,
    TEST_Date DATE NOT NULL,
    ACTUAL DATE,
    PREDICTED Date,
    CONSTRAINT TESTPKs PRIMARY KEY (TEST_Date, TESTno, ExamNo),
    CONSTRAINT TTESTNO_Fk FOREIGN KEY (TESTno) REFERENCES TESTPAPER (Flightno)
    CONSTRAINT TEXAMNo_FK FOREIGN KEY (ExamNo) REFERENCES Exam (ExamNo)
  );

Here’s the table i want to create and gives me error:

CREATE TABLE Assignment
  (
    TEST_Date DATE NOT NULL,
    ExamNo VARCHAR2(6) NOT NULL,
    TestNo VARCHAR2(6) NOT NULL,
    Type  VARCHAR2(20),
    Hours_Spent Decimal(4,2),
    CONSTRAINT ASSIGNPKS PRIMARY KEY (TEST_Date, TestNo , ExamNo),
    CONSTRAINT ASSIGNTESTDATE_FK FOREIGN KEY (TEST_Date) REFERENCES TEST(TEST_Date) ON
  DELETE CASCADE,
    CONSTRAINT ASSIGNTESTNO_FK FOREIGN KEY (TESTno) REFERENCES TESTPAPER (Flightno)
    CONSTRAINT TEXAMNo_FK FOREIGN KEY (ExamNo) REFERENCES Exam (ExamNo)
  );

May i know where’s the issue that it keeps giving me no matching unique primary keys? I already tried to recreate and labelled the ‘test_Date’ as my primary key. But oracle can’t seems to find.

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-05-26T19:42:47+00:00Added an answer on May 26, 2026 at 7:42 pm

    The PK you refer to is PRIMARY KEY (TEST_Date, TESTno, ExamNo) — hence the foreign key should be FOREIGN KEY (TEST_Date, TESTno, ExamNo) as well. The error you’re getting is due to your attempt to refer to a part of TEST‘s PK.

    See also http://download.oracle.com/docs/cd/B10500_01/server.920/a96524/c22integ.htm

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

Sidebar

Related Questions

Unable to delete [U_Family] column from table below : Table CREATE script: CREATE TABLE
I have a mysql table like this (sql): CREATE TABLE IF NOT EXISTS silver_and_pgm
I am unable to create a table and insert the values into it using
I am unable to create an empty solution in Visual Studio. The msdn documentation
Why do I get the error: Unable to create a constant value of type
For my html form, it seems that I'm unable to create cross browser hover
When running wsdl.exe on a WSDL I created, I get this error: Error: Unable
I am unable to use a variable as the vale for a table, though
Is it true that after a user signs up, a sql table is create
I want to design a table which looks something like this: avaya nchar(6) NOT

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.