Re: primary key or UNIQUE constraint error when trying to setup Relationship

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Joe Celko (jcelko212_at_earthlink.net)
Date: 06/20/04


Date: Sun, 20 Jun 2004 15:58:13 -0700


>> I'm getting an error that says: "The columns in table "<tablename>"
do not match an existing primary key or UNIQUE constraint." <<

Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, datatypes, etc. in your
schema are. Your personal narrative is useless. We need to see your
code to debug it.

Why did you say "primary key fields"?? Let's get back to the basics of
an RDBMS. Rows are not records; fields are not columns; tables are not
files.

--CELKO--

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!



Relevant Pages

  • Re: split data
    ... Please post DDL, so that people do not have to guess what the keys, ... constraints, Declarative Referential Integrity, datatypes, etc. in your ... NOT NULL PRIMARY KEY ... sku CHARNOT NULL ...
    (microsoft.public.sqlserver.programming)
  • Re: Indexes and primary keys, from Delaney
    ... > Is a unique constraint as efficient than having an unneccesary ... PRIMARY KEY constraint on the column rather than a unique index ... > claim that the sequence number is unique and never reused. ... > and account number, ...
    (microsoft.public.sqlserver.programming)
  • Re: Help with indexes on a query
    ... All tables in a relational model should have a primary key. ... since you didn't declare a PRIMARY KEY or UNIQUE constraint ... who should know the data), I guess that the combination of VorderingId, ... defining a primary key or unique constraint always ...
    (microsoft.public.sqlserver.server)
  • Re: Choosing Primary Key
    ... Aaron Prohaska wrote: ... > unique constraint and then a identity column as the primary key. ... > five columns that make up the unique constraint are ManufacturerID, ... I think your solution of using an IDENTITY column as the PK is the best ...
    (microsoft.public.sqlserver.programming)
  • Re: auto number
    ... "ABRAHAM GOLDSTEIN" wrote: ... concerned about the primary key number i hope i understood ... If you are concerned about duplicates then put a unique constraint on ... the Autonumber column; if you think you already have a unique ...
    (microsoft.public.access.tablesdbdesign)