-
Hi all...
When I'm selecting from multiple tables and do a
select * from table1, table2
where table1.value1 = table2.value1
I noticed that the output I get includes every field from both tables. I'm wondering if there's a way to output the fields from just one of the tables.
Technically, I can just do it like
select table1.value1 table1.value2... from table1,table2
where table1.value1 = table2.value1
but I'd rather not do it this way. Any and all help is greatly appreciated. Thanks.
-
LEFT JOIN
May be you can try to use the LEFT JOIN?
Code:
SELECT Table1.value1, Table1.value2 FROM Table1 LEFT JOIN Table2 ON Table1.value1 = Table2.value1 ORDER BY Tabel1.value1 ASC;
-
Use the same format for your select statement just use:
Code:
"SELECT table1.* ..."
-
Hey Chris and Negative0,
Thanks for the help. I really appreciate it.