So i wanted to extract information from 3 tables at the same time, but whenever i update my query on table1 it gives me duplicates and overrides the previous entries, like in row n in garage column if i update garage to red, it will display red for the previous entry as well. any thoughts on how to do this?
SELECT `date`,`tagid`,`garage`,`class`
FROM table1 JOIN table2 ON table1.number = table2.tagid
UNION SELECT `date`,`tagid`,`garage`,`class`
FROM table1 JOIN table3 ON table1.number = table3.tagid
UNIONby definition removes all duplicates from your resultset so the statement you've presented can't possibly contain duplicates. Without additional information as asked by @PugganSe, we can only guess what it is you really want. The statement whenever I update my query on table1 it gives me duplicates ... like in row n doesn't make any sense to me.