Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 7th, 2012  |  syntax: None  |  size: 0.29 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Is there a number wilcard in MySQL?
  2. SELECT * FROM table WHERE title LIKE '%- H(any number)'
  3.        
  4. SELECT * FROM table WHERE title REGEXP '.*- H[0-9]+'
  5.        
  6. SELECT * FROM table WHERE title RLIKE '- H[:digit:]{1,7}$';
  7.        
  8. SELECT ...
  9.   FROM table
  10.  WHERE title REGEXP '- H([1-9][0-9]{0,6}|10000000)$'
  11. ;