View Single Post
Old 01-31-2008, 07:50 PM   #12 (permalink)
wGEric
The Acquainted
 
wGEric's Avatar
 
Join Date: Nov 2007
Posts: 166
Thanks: 0
wGEric is on a distinguished road
Default

Quote:
Originally Posted by Orc View Post
I think I figured out that Inner join can be used to combine data from other tables to make one table :D
Yes, also LEFT JOIN and RIGHT JOIN. You can also do SELECT queries within other queries (as pointed out by buggabill). There's also UNIONs to do two queries at once.
Code:
SELECT name FROM cia WHERE population > (SELECT population FROM cia WHERE name='United States');
SELECT * FROM t1 UNION SELECT * FROM t2 UNION SELECT * FROM t3;
__________________
Eric
wGEric is offline  
Reply With Quote