Hello all,
I have a problem that I think is a little odd. First off i have three tables one is considered main, one with data and another one to copy the data too. Now i know about forgien key error and having to have the same value in the main as in the other.
So now I have this query .
Now this breaks and doesnt create because of issues with this num key. However when i do this query.
I get 0 returned as in there are no records that dont match. So why does this run.
Thank u
I have a problem that I think is a little odd. First off i have three tables one is considered main, one with data and another one to copy the data too. Now i know about forgien key error and having to have the same value in the main as in the other.
So now I have this query .
ALTER TABLE [dbo].[forign] WITH CHECK ADD CONSTRAINT [FK_deposits_num] FOREIGN KEY([num]) REFERENCES [dbo].[main] ([num])
Now this breaks and doesnt create because of issues with this num key. However when i do this query.
select num from dbo.foreign where not Exists ( select num from dbo.main)
I get 0 returned as in there are no records that dont match. So why does this run.
Thank u