Top "Where-in" questions

An SQL-standard condition of the form WHERE SOME_COLUMN IN (1,2,3) or using a subquery to create the list, eg WHERE SOME_COLUMN IN (SELECT X FROM MYTABLE WHERE Y)

Python/psycopg2 WHERE IN statement

What is the correct method to have the list (countryList) be available via %s in the SQL statement? # using psycopg2 …

python psycopg2 where-in
LINQ to Entities - where..in clause with multiple columns

I'm trying to query data of the form with LINQ-to-EF: class Location { string Country; string City; string Address; … } by looking …

c# linq-to-entities multiple-columns where-in
Pass string into SQL WHERE IN

I am working on a query page where a user selects a value which represents different types, each identified by …

sql sql-server where-in
CodeIgniter : how to write where_in OR where_in query?

I'm using codeigniter to query a database, and I need to conditionally compare arrays in the where clause. So basically …

php mysql codeigniter activerecord where-in
Where clause to check against two columns in another table

I am struggling to get this answer for some reason. I have two tables, table1 and table2 which look like …

sql join where-clause where-in
PostgreSQL: WHERE IN and NOT WHERE IN

I have two tables A and B, A referred to B by field A.id_b B.id, so that …

postgresql where-in
How to use WHERE IN in Rails 3 project using MySQL 2?

I am quite to new to Rails and have marginal experience with SQL-type languages. I am working on a Rails 3 …

mysql ruby-on-rails activerecord where-in
Passing an array to sqlite WHERE IN clause via FMDB?

Is it possible to pass an array to a SELECT … WHERE … IN statement via FMDB? I tried to implode the …

ios sqlite fmdb where-in
Codeigniter combine where_in and like active record queries

I have the following active record query: $this->db->select('id, email, first_name, last_name, current_location_…

php mysql codeigniter activerecord where-in
SQL exclude rows matching all of multiple criteria

I currently have a query merging two tables to create a new one for analysis. After getting some funny results …

mysql sql-server where-in multiple-conditions navicat