title: When inserting data, Insert statement conflicted with the Foreign Key constraint
body: <p>I have a table called <strong>Book_details</strong>, which has a primary key as <strong>Bid</strong> and now this BID is also a foreign key for other two table in the same database (I.e slend_details, Book_inventory)</p>
  
  <p>When I insert data into inventory_details table, I'm getting the following error: </p>
  
  <pre><code>The INSERT statement conflicted with the FOREIGN KEY constraint "FK__book_invent__Bid__1367E606". The conflict occurred in database "library_management", table "dbo.Book_details", column 'Bid'.
  The statement has been terminated.
  </code></pre>
  
  <p>This is the insert statement I used:</p>
  
  <pre><code>insert into Book_inventory (Bid, present) values (001,1)
  </code></pre>
  
  <p>This is the create statement I used for my <strong>book_inventory</strong> table:</p>
  
  <pre><code>create table book_inventory (
      Bid varchar(50) Not null Foreign Key references Book_details(Bid),
      present bit Not null*
  )
  </code></pre>
  
  <p>I have even checked the values i.e the data I am trying to enter in book_inventory table is present in the Book_details table. Still I get the error. Can someone help me out?</p>