How to perform SQL "IN" query

37 views
Skip to first unread message

Pawan Kumar

unread,
Feb 10, 2012, 9:56:27 AM2/10/12
to scala...@googlegroups.com
Hi,

Can somebody point in the direction where I can see how to use below query?
select * from table_t where id in (4,7,9,10)


Thanks
Pawan

virtualeyes

unread,
Feb 11, 2012, 7:58:08 AM2/11/12
to ScalaQuery
use inSet.

val ids = List(1,2,3)
for{o <- YourTableObject if o.id inSet ids } yield(o)

Pawan Kumar

unread,
Feb 11, 2012, 9:39:36 AM2/11/12
to scala...@googlegroups.com
Thanks, it worked.

Pawan
Reply all
Reply to author
Forward
Message has been deleted
0 new messages