Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT t.*
- FROM YOUR_TABLE t
- WHERE t.column LIKE '123-%'
- OR t.column LIKE '123_%'
- SELECT a.*
- FROM YOUR_TABLE a
- WHERE a.column LIKE '123-%'
- UNION ALL
- SELECT b.*
- FROM YOUR_TABLE b
- WHERE b.column LIKE '123_%'
- select * from foo where bar regexp '^123-|_'
- SELECT * FROM table
- WHERE field like "123"
- OR field LIKE "123-%"
- OR field like "123_%";
- select * from table where field regexp '^[1-9]{3}[_-]';
Add Comment
Please, Sign In to add comment