mysql - How to search where some data is in table 1 and other data is in table 3 with both having a UUID the same -
i have 3 tables
for instance
salestable -id -variableb -customeruuid -variablec customertable -customeruuid -contractuuid contracttable -contractuuid -variabled
so doing sql query on salestable
like:
select distinct variableb salestable variabled = "blah";
how can this? can find contract associated current salestable?
a bit more info
they 1:1 relationship - contracttable tied 1 customertable tied 1 salestable
there lot of data in database thousands of entries - query not run need run efficent.
select a.* salestable inner join customertable b on a.customeruuid = b.customeruuid inner join contracttable c on b.contractuuid = c.contractuuid c.variabled = 'valuehere'
to further gain more knowledge joins, kindly visit link below:
Comments
Post a Comment