I have table_1 and table_2; the column in table_1 is a string, lets call it s1, with multiple values separated by comma, EXAMPLE: 'tmp,a1,a2,a6,a7' ; the numbers after the 'a' are unique; in table_2 there are two columns: c1, c2; c1 contains all the numbers after the 'a' in s1; c2 cointains the numbers that need to replace the ones in s1, if they are null they dont need to be replaced. I need to modify all the numbers after the 'a' with the numbers in c2 when they are equal to the numbers in c1 and when c2 is not null
How can i do this in mySQL
i tought of using the replace() function, but i dont know if i can insert a query inside of it
EDIT: i know this violate first rule of integrity, but i have no choice since i was told to not modify existing table