'mysql INSERT INTO results in NULL values

So I am trying to insert the results of a query into the column 'unique_id' in my Listings_20220116 table, and all I get as a result are null values in the column. The query does not report any errors and seems to be working, but the desired values are not added to the column.

ALTER TABLE Listings_20220116 
ADD COLUMN unique_id VARCHAR(100);

INSERT INTO Listings_20220116 (unique_id)
SELECT 
  CONCAT(CAST(Date AS CHAR), Lookup)
FROM Listings_20220116;

If I create a new table using the below query then it works, but I want to add the values to the existing table:

CREATE TABLE xxx
SELECT *, CONCAT(CAST(Date AS CHAR), Lookup) AS 'Unique_ID'
FROM Listings_20220116 l ;

Any idea what I am doing wrong?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source