开发者

Complex SQL table update with RegEx's in MySQL

I am pulling unstructured data from a source and I am trying to put in structured from in DB. To minimize the amount of overhead by bombarding my server with multiple queries, i was wondering if there is a way to do a complex query that: Searches a string for a regex pattern say A[0-9]G+ and add a new row in another table where row.column = found column from regex开发者_JAVA技巧


MySQL has an INSERT-SELECT statement that lets you combined a selection (as complex as you want, including regex) with an insertion into a table of whatever was selected.

http://dev.mysql.com/doc/refman/5.5/en/ansi-diff-select-into-table.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜