I have this statement in a JSTL tag. But it only displays
the last field "addr".
How do I select both tables or multiple unrelated (except for "user" field) tables
and display all data found on one page?
From what I read, the UNION is what am looking for, but its not working
right and am not sure what am doing wrong here.
thanks
the last field "addr".
How do I select both tables or multiple unrelated (except for "user" field) tables
and display all data found on one page?
From what I read, the UNION is what am looking for, but its not working
right and am not sure what am doing wrong here.
Code:
<sql:query>
SELECT user, name, inform, addr from t1 where user='234' UNION
SELECT user, name, inform, addr from t2 where user='234'
</sql:query>
thanks