What is the equivalent of REGEXP_SUBSTR in mysql?

Posted by KandadaBoggu on Stack Overflow See other posts from Stack Overflow or by KandadaBoggu
Published on 2010-04-30T06:17:23Z Indexed on 2010/04/30 6:27 UTC
Read the original article Hit count: 224

Filed under:
|

I want to extract a word from a string column of a table.

description
===========================
abc order_id: 2 xxxx yyy aa
mmm order_id: 3 nn kk yw

Expected result set

order_id
===========================
2
3

Table will at most have 100 rows, text length is ~256 char and column always has one order_id present. So performance is not an issue.

In Oracle, I can use REGEXP_SUBSTR for this problem. How would I solve this in MySQL?

© Stack Overflow or respective owner

Related posts about mysql

Related posts about sql