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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:07:14+00:00 2026-05-24T18:07:14+00:00

I have a relational table containing a foreign key in which there is no

  • 0

I have a relational table containing a foreign key in which there is no “on delete cascade” property set. Now I wanna delete a particular record but I am unable to do it!

When I try to delete a record from the referenced relation, It gives error “The delete statement conflicted with the foreign key constraint.”

When I try to delete a record from the referencing relation, It gives the same error.

Even I cannot change the database schema now. Any way out?

Update:
The relational Schema

Customer(c_id,c_name);
Products(p_id,p_name,p_cost);
purchases(p_id references Products,c_id references Customr);

I wanna delete a tuple from the purchases relation.

Update : The delete statement

The table already contains the following data :

c_id p_id

1 4

1 3

1 2

1 1

2 3

1 4(Notice duplicate tuple)

Now I wanna delete the record just above this line. i.e. the duplicate record.
I just right-clicked on the tuple shown in the table-view in the management studio and hit the delete key. It gived error.

UPDATE

I used

delete from Purchases where c_id=1 and p_id=4 

It worked All Fine!!!

Initially I used to delete by selecting the record in the table-view and pressing the delete key. Now it worked. Can anyone Please explain me whatwas the difference?

  • 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-24T18:07:15+00:00Added an answer on May 24, 2026 at 6:07 pm

    You were probably using the Edit top X records interface in SQL Server Management Studio to delete the record. This functionality requires you to have a primary key defined on the table, since it needs to be able to uniquely identify the row you are trying to delete. It cannot delete the row from the table directly, all it does is construct the SQL in the background for you. Do you have a Primary Key defined on the table?

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

Sidebar

Related Questions

I have a relational database with a Client table, containing id , name ,
I have a table with a few relational columns and one XML column which
I have a table containing some categories Categories Table: -- category_id <-- primary key
I have two relational tables: the Profiles table which contains 3 kinds of user
I have a XML column which contains XML like this: <Set> <Element> <ID> 1
I have a relational model with an associative table. But in addition to the
I need to store a set of entities, of which there are several specialized
Lets say you have a relational DB table like INVENTORY_ITEM. It's generic in the
I have a relational database with about 100 tables. Each table has unique, numerical,
So you have a relational database and you define some foreign keys for reference

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.