Advertisement
Guest User

Untitled

a guest
Sep 17th, 2014
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. SELECT MAX(SUBSTRING_INDEX(0001-14-A,'-',1)) AS prefix;
  2.  
  3. prefix
  4. ------
  5. 0001
  6.  
  7. SELECT MAX(SUBSTRING_INDEX(0001-14-A,'-',1)) + 1 AS prefix;
  8.  
  9. prefix
  10. ------
  11. 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement