INSERT INTO bad_data_table SELECT *, 'The ID is NULL' AS Reason FROM raw_data_table WHERE id IS NULL;