dbapi2 select where IN (...)

yota.news at gmail.com yota.news at gmail.com
Mon Nov 23 15:49:44 EST 2009


hello,

I couldn't find how the dbapi2 planned to handle the sql IN statement.

ex :
SELECT * FROM table WHERE num IN (2,3,8,9);

I'd be glad to take advantage of the ? mechanism, but what about
tuples !

execute("""SELECT * FROM table WHERE num IN ?;""" ,
((2,3,8,9),))    ...fail...

what would be the most pythonic way to do this ?




More information about the Python-list mailing list