Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - SQL statement, how to intercept a string with a certain format and convert it into integer+1
SQL statement, how to intercept a string with a certain format and convert it into integer+1
Here is a reference method, you can try it.

First of all, pattern matching is used to find a string in a certain format, that is, it is used to search for a string in a certain format like' cu000_'. Then insert the query results into the new table.

Then use a maximum function to query and find the maximum value. Then add 1 to this value using pattern matching.