How do i update and copy data from the same table but the new data is JSON formatted data.
I am expecting the updated field to be: {"t":"token1", "s":"secret1"}
DB user_api table:
(id) (token) (secret) (api)
---------------------------
1 token1 secret1 NULL
Update query:
UPDATE user_api SET api = '{"t":"' +token+ '", "s":"' +secret+ '"}';
+as an addition operator; but has a CONCAT() function that allows you to concatenate strings