Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. CREATE PROCEDURE test (field1 varchar(4), field2 varchar(4), array varchar (255))
  2.  
  3. ...
  4. WHERE some_field IN (array)
  5. ...
  6.  
  7. mysql> select find_in_set(2, '1, 2, 3');
  8. +---------------------------+
  9. | find_in_set(2, '1, 2, 3') |
  10. +---------------------------+
  11. | 0 |
  12. +---------------------------+
  13.  
  14. mysql> select find_in_set(2, '1,2,3');
  15. +-------------------------+
  16. | find_in_set(2, '1,2,3') |
  17. +-------------------------+
  18. | 2 |
  19. +-------------------------+
  20.  
  21. WHERE some_field IN (select array_id from temp_table)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement