Code: Select all
SELECT a.*, b.column1 FROM table1 AS a, table2 AS bModerator: General Moderators
Code: Select all
SELECT a.*, b.column1 FROM table1 AS a, table2 AS bWell I don't use a JOIN if that's what your asking. There is a linkage between table1 and table2. This is what I have:arborint wrote:Yes, that's fine. But you might want to do a proper join if the two tables are linked by a key.
Code: Select all
SELECT a.*, b.column1 FROM table1 AS a, table2 AS b WHERE a.stuff_id=b.stuff_id AND a.stuff_id=5Code: Select all
SELECT a.*, b.column1 FROM table1 AS a LEFT JOIN table2 AS b ON a.stuff_id=b.stuff_id WHERE a.stuff_id=5