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)

Get all rows matching a list in a SQL query

I have the following SQL query that selects any row matching ANY of the values in the list (9, 10): SELECT r.…

mysql sql where-in
Checking if specific tuple exists in table

Is there a way to check if a specific tuple exists in a table in a where-in statement? Something like: …

sql sqlite tuples where-in
SQL Read Where IN (Long List from .TXT file)

I have a long list about 5000+ of ID's (numbers). ID 4 5 6 9 10 14 62 63 655 656 657 658 659 661 662 I would like to know if there a way to …

sql where-clause where-in
Why is this mySQL query extremely slow?

Given is a mySQL table named "orders_products" with the following relevant fields: products_id orders_id Both fields are …

mysql sql query-performance where-in
Using JSONB_ARRAY_ELEMENTS with WHERE ... IN condition

Online poker players can optionally purchase access to playroom 1 or playroom 2. And they can be temporarily banned for cheating. CREATE …

postgresql select where-in postgresql-9.5 postgresql-json
Avoid SQL WHERE NOT IN Clause

I have 3 tables listed below: Blog BlogArticle Article ---- ----------- ------- id id------blog_id -id title article_id__/ title This …

sql where-in
MYSQL query WHERE IN vs OR

I have developed a system using an OR query: SELECT * FROM tableA JOIN tableB ON (idA = idB) WHERE idA = 1 OR …

mysql sql where-in
SQL IN equivalent in CAML

Is there a "nice" way to create a CAML query for SharePoint that does something like this? SELECT * FROM table …

sql sharepoint-2007 caml where-in
using array in WHERE IN in CakePHP

I'm working on CakePHP 3.2 I want to use an array in the query WHERE IN () The code is as $filter_…

cakephp where-in cakephp-3.2
Performing a WHERE - IN query in CouchDB

I would like to query for a list of particular documents with one call to CouchDB. With SQL I would …

sql database couchdb where-in