Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
somu210
Starting Member
1 Post |
Posted - 2013-03-13 : 09:35:16
|
hii am created two tables countries,states,in countries tables i took 10 values.in state table i entered 12 values but the problem is it is executed only for ten values after that it showing an error.The error isMsg 547, Level 16, State 0, Line 4The INSERT statement conflicted with the FOREIGN KEY constraint "FK__States__State_Id__21B6055D". The conflict occurred in database "MYDEMO", table "dbo.Countries", column 'Country_Id'.Thanks in Advancesomunsomun |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-03-13 : 10:12:49
|
you need to make sure the countryid value you enter for state table is one that exists in country table otherwise you will get the specified error.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|