Hi
I have three tables birthdays, events, holidays I want to fetch data from all three tables order by date. Can i do this? if i can what's the way?
Regards,
select from 3 tables order by date
Moderator: General Moderators
Re: select from 3 tables order by date
By using UNION?
Also, use a constant column to distinguish records from the 3 tables, if you need to.
E.g.:
[sql]SELECT 1, .....FROM table1unionSELECT 2, ....FROM table2[/sql]
Also, use a constant column to distinguish records from the 3 tables, if you need to.
E.g.:
[sql]SELECT 1, .....FROM table1unionSELECT 2, ....FROM table2[/sql]
There are 10 types of people in this world, those who understand binary and those who don't