query in query code example

Example 1: NESTED QUERY SQL

SELECT column_name [, column_name ]
FROM   table1 [, table2 ]
WHERE  column_name OPERATOR
   (SELECT column_name [, column_name ]
   FROM table1 [, table2 ]
   [WHERE])

Example 2: what is subquery in sql

SUBQUERY IS NESTED QUERY INSIDE A SELECT, 
INSERT OR UPDATE METHODS. OR INSIDE ANOTHER SUBQUERY

Example 3: in query in sql

SELECT Id, FirstName, LastName, Country  FROM Customer WHERE Country IN        (SELECT Country           FROM Supplier)

Example 4: select in select sql

SELECT column-names  FROM table-name1 WHERE value IN (SELECT column-name                   FROM table-name2                   WHERE condition)

Tags:

Sql Example