Table SQL



  • There's table Holiday with the fields.

    Holiday ID-это первичный ключ,
    TabelID-внешний ключ,
    StartDate,
    FinishDate
    

    Thelement of the table is as follows:

    insert into Holiday(HolidayID,TabelID,StartDate,FinishedDate) values
    (1000, 100, '2011-02-02', '2011-02-05') 
    go
    

    Mistake:

    The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Holiday_Sotrdnik." The conflict occurred in OtdelK database, table dbo.Sotrdnik, column 'TabelID'.

    How do you decide?



  • Fill the table first Tabel


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2