i have 3 tables:- sector, category, subcategory sector table id->primary key sector-name category table id->primary key secid->Foreign key to sector table category-name subcategory id->primary key secid->Foreign key to sector table catid->Foreign key to category table subcat-name now i want sector-name, category-name and subcat-name from 3 tables..how to join these 3 tables....
I think you can write like this.... select sc.name, ct.name, sct.name from sector sc, category ct, subcategory sct where sc.id=ct.secid and sc.id=sct.secid and ct.id=sct.catid";