subqueries | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

subqueries

subqueries can be from another table or must be in the same table ?

2nd Jan 2017, 3:15 PM
عبد الرحيم حسونه
عبد الرحيم حسونه - avatar
1 Answer
+ 7
Yes, they can be from another table. See example. SELECT column-names FROM table-name1 WHERE value IN (SELECT column-name FROM table-name2 WHERE condition)
2nd Jan 2017, 4:08 PM
Marcel Toeltl
Marcel Toeltl - avatar