0

i have a list of users' id which is in guid format where i would like to pass my my code to the stored procedure created in the form of 'guid1','guid2' ...etc. I need to use the list of GUIDs for the in clause eg . IN ('Guid1','Guid2'). However it does not seems to working, any advices or idea on this issue? Thanks.

Low Chen Thye
  • 67
  • 2
  • 8
  • Use `FIND_IN_SET()` to search a comma-delimited string. – Barmar Jun 21 '22 at 17:01
  • Hi there, thank you for your suggestion, I have tried FIND_IN_SET(), however it seems that the function will cause the query to not use index which could impact the performance? – Low Chen Thye Jun 21 '22 at 17:24
  • If you don't want to do that, you need to use `PREPARE` to concatenate the parameter into the query. – Barmar Jun 21 '22 at 17:27

0 Answers0