title: INSERT statement conflicted with foreign key constraint?
body: <p>I'm having issue with an assignment I'm working on right now. The question is:</p>
  
  <p>Write an INSERT statement that adds this row to the <code>Products</code> table:</p>
  
  <ul>
  <li>ProductID: The next automatically generated ID </li>
  <li>CategoryID: 4 </li>
  <li>ProductCode: dgx_640 </li>
  <li>ProductName: Yamaha DGX 640 88-Key Digital Piano </li>
  <li>Description: Long description to come. </li>
  <li>ListPrice: 799.99 </li>
  <li>DiscountPercent: 0</li>
  <li>DateAdded: Today’s date/time.</li>
  </ul>
  
  <p>Use a column list for this statement.</p>
  
  <p>And the answer I came up with is:</p>
  
  <pre><code>INSERT INTO Products(CategoryID, ProductCode, ProductName, Description, ListPrice, DiscountPercent, DateAdded)
  VALUES (4, 'dgx_640', 'Yamaha DGX 640 88-Key Digital Piano', 'Long description to come.', 799.99, 0, SYSDATETIME()) 
  </code></pre>
  
  <p>But when I try to execute it, an error comes up saying </p>
  
  <blockquote>
    <p>The INSERT statement conflicted with the FOREIGN KEY constraint "FK__Products__Catego__3B75D760". The conflict occurred in database "MyGuitarShop", table "dbo.Categories", column 'CategoryID'.
    The statement has been terminated.</p>
  </blockquote>
  
  <p>Any help would be appreciated</p>