There is a need to convert an INSERT statement from a data table data exported from MySQL into an UPDATE statement.
You need to put a statement such as the following:
Insert INTO ' table ' (' ID ', ' Code ', ' detail ') VALUES (' 1 ', ' 110000 ', ' xx city ');
Change to: Update table Set detail = ' xx city ' where code = ' 110000 '
Studied for a long time.
Here's how it's implemented:
First. Open data file original data file with sublime
1. Figure I: Raw data.
2. Use regular to match: (' 1 ', ' 110000 ', ' Beijing '); Here is the expression: (' \d+ '), (' \d+ '), (' \s+ ')
In the second step, Ctrl + H opens the current replacement mode and matches and replaces it with regular.
Third, replace the successful result.
Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvywvyy2hp/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70 /gravity/southeast ">
Four, finally another little tail, put); Replace with Blank put
);Replaced by
Blank
For example, as seen in:
Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvywvyy2hp/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70 /gravity/southeast ">
At this point, you are done. Ha ha. Celebrate
Happy to be original. Collection and reprint are strictly forbidden.
This address: http://blog.csdn.net/aerchi/article/details/46739167
Sublime Text advanced Regular swap replacement function