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
精彩评论