i have 2 tables
ticket_message
msg_id(int)
created(date)
response_message
res_id(int)
created(date)
how can i merge the 2 tables so they are order by created
msg_id created
resp_id created
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t think merge means join.
Join means you make two rows of each table into a bigger row based on some join condition.
If you want to read all rows from one table then from another and then order them use the UNION operator then ORDERBY on the unioned set. Be warned, Union makes your indexes unusable, so Ordering can be quite slow!
So that’ll be
I’ve added a type column to make it easier to distinguish…