DELETE fc
FROM vclib.t_file_content AS fc
LEFT OUTER JOIN vclib.t_file AS f ON
f.fileid = fc.filecontentid
where f.fileid is null;

ALTER TABLE vclib.t_file_content ADD CONSTRAINT FK_T_FILE_T_FILE_CONTENT_FileContentID
FOREIGN KEY("FileContentID") REFERENCES vclib.t_file (FileID);
