mysql - INSERT SELECT with string SQL -
i want copy content of 1 column column. copied content should linked string.
| company | new_company | _____________________________ google | google company here "the" , "company" attached string content.
i have tried lot, meaningful me looks like:
insert table_name (copy_into_column) select concat('the ', copy_from_column, ' company') table_name but sql error:
#1292 - incorrect datetime value: '0000-00-00 00:00:00' column 'time' @ row 1035 of course, have several columns in right table, should disregarded or?
i hope has idea.
aren't looking update statement?
update table_name set copycol = concat('the ', copy_from_column, ' company') about error get:
you have timestamp field apparently required. code you've shared, see inserting new rows db, guess don't fill other columns.
Comments
Post a Comment