sqlslickplay-slick

How to use SQL IN operator in Slick


How do you perform the following SQL operation in Slick:

select * from tablename where label in ('A', 'B');

Haven't been able to find in the documentation or elsewhere.


Solution

  • The Slick operator is inSet. (I assume in collided with something.)

    For example:

    tablename.filter(_.label inSet Set("A", "B")).result