We are getting data from a table.
SELECT field1, field2, field3 FROM table1;
We are getting data from tables.
SELECT table1.common_field1, -- field/data on both tables table1.field2, table2.field3, table2.field4 FROM table1 -- left table (main if `LEFT JOIN`) INNER|LEFT|RIGHT JOIN table2 -- right table (main if `RIGHT JOIN`) ON table1.common_field1 = table2.common_field1; -- relation between tables
Download the class notes for day 2.


