Portal Home > Knowledgebase > Articles Database > Select query
Select query
Posted by mohammadi, 11-03-2010, 05:26 AM |
I have a forign key in one of my table and it`s a primary key in the other table how can I select two fields in first table and join them with information in second table alse I`m going to show all the records from second table.
please help me.
thanks
|
Posted by Driver01, 11-03-2010, 06:40 AM |
I think join is the magic word here...I presume this is mySQL
and I don't fully understand the question but here's a shot in the dark...
http://www.tizag.com/mysqlTutorial/mysqlleftjoin.php
|
Posted by tim2718281, 11-03-2010, 07:53 AM |
select t1.c1, t1.c2, t2.c3, t2.c4, t2.c5 from tablename1 as t1 , tablename2 as t2 where t1.colx = t2.coly;
|
Posted by TheDandy, 11-06-2010, 01:45 PM |
|
Add to Favourites Print this Article
Also Read
system dll (Views: 818)