amazon web services - splitting a string in a mysql table field and store to two fields -


i have mysql table (in aws rds) field f1, f2 , f3. f1 has strings 'abc-def'. need split f1 values hyphen 2 strings ('abc' , 'def') , store them f2 , f3 in same row.

the record before changing:

f1: abc-def  f2: f3: 

the record after changing:

f1: abc-def f2: abc f3: def 

it seems mysql support regexp not reference. last resort using mysqldump want see if there way in mysql directly.

any reply appreciated!

there post discusses using commas separator found @ can mysql split column?. update procedure setting 2 columns substring_index results.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -