Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. FEL10
  2. FEL20
  3. FEL30
  4. PRO05
  5. PRO07
  6. PRO08
  7. VAI12
  8. VAI13
  9. VAI14
  10.  
  11. FEL*
  12. PRO*
  13. VAI*
  14.  
  15. SELECT col1 FROM table1 WHERE col1 LIKE 'FEL%';
  16.  
  17. SELECT col1 FROM table1 WHERE col1 REGEXP '(FEL|PRO|VAI).*'
  18.  
  19. SELECT distinct left(col, 3) as category FROM `table1`
  20.  
  21. select distinct left(combicode, 3)
  22. from mytable;
  23.  
  24. select *
  25. from mytable
  26. where combicode like concat(@category, '%');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement