sql - Extract numbers in a body of text in mysql -


suppose have column has text numbers. example,

row 1: have 3 apples.
row 2: in y2009, bill 32 dollars.
row 3: 22 years old.

i want create column follows:

row 1: 3
row 2: 32
row 3: 22

note not want accidentally extract 2009 y2009. want 32. tried following, extracts rows numbers come first.

select @num := convert(`col1`, signed) num_part my_table; 


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -