I have two tables and my goal is to move specific data from the first table into the second table along with a reason for why that data was moved. For instance:
Try this query:
INSERT INTO bad_data_table VALUES ( (SELECT * FROM raw_data_table WHERE id IS NULL LIMIT 1), "The ID is NULL");
The subquery here needs to have 1 row!
INSERT INTO bad_data_table SELECT *, 'The ID is NULL' AS Reason FROM raw_data_table WHERE id IS NULL;