sql subqueries examples
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: why we use subquery in sql
We use subquery in order to get aggregate value in column without grouping data
Example 3: subquery sql
UPDATE Book SET note= 'editore: ' + (SELECT name FROM Publisher WHERE Publisher.ID = Book.publisher)