Tagged: subquery

Oracle glossary: in, not in

In and not in are conditions. Useful for tests one or more values for membership(or not) in a list of values or subquery Some example: select * from table where col1 in (23, 45, 342) — where values of col1 match with 23, 45, 342 select * from table where col1 not in (23, 45, 342) — where values of col1 not match with 23, 45, 342 select * from table where (col1, col2) in (select val_a, val_b from testtab) — where value of col1 and col2 match with val_a and val_b of qubquery

Oracle glossary: Subquery

Oracle subquery is a sql query within another sql query. Some example: select tab.name, tab.surname from (select name, surname from customer where surname like ‘S%’) tab select id from myusers where (name, surname) in (select name, surname from customer where surname like ‘S%’) tab select (select ‘1’ from dual) from table.