Top "In-subquery" questions

Use this tag for questions related to subqueries (i.e. a query that is nested inside a SELECT, INSERT, etc.

JPA 2.0, Criteria API, Subqueries, In Expressions

I have tried to write a query statement with a subquery and an IN expression for many times. But I …

jpa subquery jpa-2.0 criteria-api in-subquery
MySQL DELETE FROM with subquery as condition

I am trying to do a query like this: DELETE FROM term_hierarchy AS th WHERE th.parent = 1015 AND th.…

mysql sql subquery sql-delete in-subquery
MySQL WHERE <multiple-column> IN <subquery>

Is there a way (without JOIN) to use the WHERE clause on 2 columns (OR) IN a subquery? Currently, I'm doing …

mysql where-clause multiple-tables in-subquery
What's wrong with this MySQL query? SELECT * AS `x`, how to use x again later?

The following MySQL query: select `userID` as uID, (select `siteID` from `users` where `userID` = uID) as `sID`, from `actions` where `…

sql mysql subquery in-subquery
LINQ subquery IN

I'm a newbie with the IQueryable, lambda expressions, and LINQ in general. I would like to put a subquery in …

linq-to-sql in-subquery
MySQL DELETE FROM with UNION subquery by IN condition

I have tripped up on a curious SQL error. The last query doesn't work. Of course I can just split …

mysql subquery union sql-delete in-subquery
Query with HAVING and WHERE

I'm trying to create a single query that will combine the following two queries. SELECT campgroundid, ( 3959 * acos( cos( radians(37) ) * cos( …

sql mysql subquery in-subquery
MySQL using IN/FIND_IN_SET to read multiple rows in sub query

I have two tables, locations and location groups CREATE TABLE locations ( location_id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, name …

mysql subquery in-subquery