When using relational databases and SELECTING data from more than one table, using joins is the answer to make ideal queries.Two options are to use an inner join or LEFT JOIN. The inner join will select data and return results for all rows that match while an OUTER JOIN or LEFT JOIN will show all entries; even those which exist in 1 table, but not in the other. Depending on circumstances, one of the joins is the ideal usage. For example, let`s assume 2 tables share the same category id. One table has 6 categories that match six of seven categories of the second. An inner join will retrieve the 6 matching categories while the LEFT or OUTER JOIN will select 7 categories. However, in the case of the LEFT JOIN, the first table sets the stage. If the table with 6 entries was the first called in the statement only 6 entries would have been selected and matched but if the table with 7 categories was selected first it would show all seven entries.
© 2018 ALL Rights Reserved | Sitemap
Vancouver | North Vancouver | Burnaby | Richmond | Coquitlam | Port Coquitlam | Surrey | Langley | Maple Ridge | Mission | Abbotsford | Kamloops | Kelowna | Victoria | Squamish | Whistler | Pemberton