title: Why do I get a foreign key constraint error
body: <p>I'm trying to insert values in a table with sql server 2012, but i have this error: </p>
  
  <pre><code>The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Fabricante". 
  The conflict occurred in database 
  "practica", table "dbo.Fabricantes", column 'Codigo'.
  </code></pre>
  
  <p>I just have two tables available.</p>
  
  <p>this is the code that i use to create the tables</p>
  
  <pre><code>create table Fabricantes(
  Codigo int identity primary key,
  Nombre nvarchar (100) not null)
  
  create table Articulos(
  Codigo int identity primary key,
  Nombre nvarchar (100) not null,
  Precio int,
  Fabricante int,
  constraint FK_Fabricante foreign key
  (Codigo) references Fabricantes (Codigo))
  </code></pre>