delete fc 
from vclib.T_FILE_CONTENT fc left join vclib.t_file f on f.FileID = fc.FileContentID
where f.FileID is null
GO

ALTER TABLE VCLib.T_FILE_CONTENT ADD CONSTRAINT [FK_T_FILE_T_FILE_CONTENT_FileContentID]
FOREIGN KEY([FileContentID]) REFERENCES VCLib.T_FILE ([FileID])
GO


