从MySQL中的字符串中提取数字

时间:2013-08-09 17:18:39

标签: mysql

我需要从字符串中删除所有字符,或者提取数字并将数字存储在临时表中。

这是我到目前为止所做的:

drop table if exists T_Stores;
create temporary table T_Stores(
    store varchar(50)
);


insert into T_Stores
select p.pev_nms from bsgtran.pev p where p.pev_nms regexp '(new|relo|under).*store'
;

它目前将p.pev_nms的值保存到store列中。其中有许多不同的方式New Store 00001New Store 00001 CANew Store 00001 1st St., New York, NY以及许多其他不同的组合。如何从字符串中提取5位数字符?

0 个答案:

没有答案
相关问题