1.2 Sub Query With Select Statement
Sub queries are most frequently used with the SELECT statement. The basic syntax is as follows
QUERY: - SELECT column_name [, column_name ]
FROM table1 [, table2]
WHERE column_name OPERATOR (SELECT column_name [, column_name]
FROM table1 [, table2] [WHERE])
EXAMPLE: - SELECT * FROM CUSTOMERS
WHERE ID IN (SELECT ID FROM CUSTOMERS WHERE SALARY > 4500)
Last modified: Tuesday, 7 January 2020, 10:21 AM