I would like to know if it's possible to ask over multiple tables with the same field name and only write the asked value once. Possibly to avoid Redundancies.
As example:
SELECT * FROM table WHERE Table1.Status AND Table2.Status AND Table3.Status = 99
In the result every row should have the status 99.
I tested this already and it doesn't work, so if you have any experience or idea please let me know.
I'm only curious, if this is possible or not.
Thank you very much
You can't create columns with the same name in the same table.
In different table you can use alias:
SELECT table.status AS status1,
table2.status AS status2,
table3.status AS status3
FROM table
JOIN table2 ON table.status = table2.status
JOIN table3 ON table.status = table3.status
WHERE table.status = 99