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

python 3.x - Mapping specific letters onto a list of words -

javascript - jquery or ashx not working -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -