我的table.value是varchar。它包含类似'... totalValue:xxxx,... . Now I want to create a view which extract xxxx from
value`的字符串,并将其转换为数字作为视图的列。
也许是这样的?
create view v_data
as select
value REGEXP `.*,totalValue:(.*),.*` (1).toNumber as totalvalue
from table;
非常感谢!!!